Wednesday, July 16, 2008

Displaying cpu usage separately for each processor ....

Didn't know this until someone asked me how to display the cpu usage for each CPU. Found 'mpstat':

mpstat -P ALL
Linux 2.6.18-92.1.6.el5xen (foo.domain.com) 07/16/2008

04:28:28 PM CPU %user %nice %sys %iowait %irq %soft %steal %idle intr/s
04:28:28 PM all 0.02 0.00 0.01 0.01 0.00 0.00 0.00 99.95 135.16
04:28:28 PM 0 0.03 0.00 0.02 0.04 0.00 0.00 0.00 99.91 44.19
04:28:28 PM 1 0.01 0.00 0.01 0.00 0.00 0.00 0.00 99.97 29.24
04:28:28 PM 2 0.01 0.00 0.01 0.00 0.00 0.00 0.00 99.97 29.23
04:28:28 PM 3 0.01 0.00 0.01 0.00 0.00 0.00 0.00 99.97 32.50

Nice.

No comments: