Skip to content


Commands

CPU and Memory Usage

top – i,o,A,M,i,z

mpstat  -P ALL

sysstat

sar – u 2 5

sar -o output.file 12 8 >/dev/null 2>&1 &

nohup sar -o output.file 12 8 >/dev/null 2>&1 &

sar -f data.file

Find out who is monopolizing or eating the CPUs

ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10

or

# ps -eo pcpu,pid,user,args | sort -r -k1 | less

isostat

iostat -xtc 5 3

To See Threads ( LWP and NLWP)

# ps -AlFH

To See Threads After Processes

# ps -AlLm

See Every Process Running As User Ramesh

# ps -U ramesh -u ramesh u

Set Output In a User-Defined Format

# ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm

# ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm

# ps -eopid,tt,user,fname,tmout,f,wchan

Find Out The Top 10 Memory Consuming Process

# ps -auxf | sort -nr -k 4 | head -10

Find Out top 10 CPU Consuming Process

# ps -auxf | sort -nr -k 3 | head -10


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.

Spam protection by WP Captcha-Free



I'm happy to use Increase Sociability.