Top: Show CPU Usage on all cores

Written by Benjamin Cane on 2011-08-28 20:31:05

By default the command top will show you an aggregation of the cpu usage. If you want to see the statistics on each core you can do this within top.

Normal top output:

top - 16:39:08 up 23 days, 22:03, 2 users, load average: 0.07, 0.02, 0.00  
Tasks: 88 total, 1 running, 87 sleeping, 0 stopped, 0 zombie  
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st  
Mem: 536684k total, 514528k used, 22156k free, 3976k buffers  
Swap: 1048568k total, 352996k used, 695572k free, 53052k cached

After running top you can hit the 1 key and it will show you all of the cpus individually

top - 16:44:23 up 23 days, 22:09, 2 users, load average: 0.00, 0.00, 0.00  
Tasks: 86 total, 1 running, 85 sleeping, 0 stopped, 0 zombie  
Cpu0 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st  
Cpu1 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st  
Cpu2 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st  
Cpu3 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st  
Mem: 536684k total, 528108k used, 8576k free, 3944k buffers  
Swap: 1048568k total, 353760k used, 694808k free, 49552k cached

comments powered by Disqus
Picture of Benjamin Cane

Benjamin is a Systems Architect working in the financial services industry focused on platforms that require Continuous Availability. He has been working with Linux and Unix for over 10 years now and has recently published his first book; Red Hat Enterprise Linux Troubleshooting Guide.

Publications

Identify, capture and resolve common issues faced by Red Hat Enterprise Linux administrators using best practices and advanced troubleshooting techniques

What people are saying:
Red Hat Enterprise Linux Troubleshooting Guide may just be all you need in your quest to wear the red hat. - Perry N.
Buy on Amazon

Sponsored by