20090422

snippets used to identify cause of high CPU usage

Snippets useful for investigating high CPU usage

Top 10 CPU consuming processes
ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10

Identify device encountering IO wait (x is optional and will display more details)
iostat -x 5

Identify processes encountering IO wait (and usually causing the IO)
ps -eo pid,stat,args,wchan | grep ' D'

And of course the awesome tool of 'sar' that is provided within the 'sysstat' package.

No comments:

Post a Comment