Linux: How to see dual Core AMD or Intel CPU statistics

by on September 20, 2006 · 13 comments· LAST UPDATED September 20, 2006

in , ,

Many new Linux sysadmin do not have idea about how to see dual core CPU (AMD or Intel D processor) statistics. You need to use following commands to see dual core stats.

The top program provides a dynamic real-time view of a running system. It can display system summary information as well as a list of tasks currently being managed by the Linux kernel. The types of system summary information shown and the types, order and size of information displayed for tasks are all user configurable and that configuration can be made persistent across restarts.

Task: Verify that you have dual core cpu

$ grep -i core /proc/cpuinfo
Output:

model name      : Dual Core AMD Opteron(tm) Processor 170
core id         : 0
cpu cores       : 2
model name      : Dual Core AMD Opteron(tm) Processor 170
core id         : 1
cpu cores       : 2

Task: Verify that you are running Linux smp kernel

$ uname -r
2.6.9-42.0.2.ELsmp

Task: See dual core CPU statistics using top command

Type top command:
$ top

Now you will see top but with core only. To enable or display stats press the number 1 and you should see individual CPU core stats:
Linux top command dual core stats
(Click to enlarge image)

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 13 comments… read them below or add one }

1 Arun September 20, 2006 at 1:10 pm

Useful tips. Thanks.

Reply

2 Sonali May 21, 2007 at 12:14 pm

Vivek,

It’s a very usefull link for me, thanks!

Reply

3 Javantea October 3, 2007 at 5:55 pm

Useful information. I didn’t see that you say to press the number 1 until I looked a second time. Thanks.

Reply

4 Praveen Kannan June 17, 2008 at 1:14 am

I tried grep -i core /proc/cpuinfo
the system didnt output anything
It just accepted the command without prompting an error.

Reply

5 justin August 14, 2008 at 3:43 am

It’s useful for me.

Thanks.

Reply

6 whocarez September 24, 2008 at 9:31 am

Thanks. Googled for it and this is just what I needed.

Reply

7 some guy July 14, 2009 at 3:58 pm

I looked all over for the command to display all CPU’s at once and finally found it,

Im running 2 quad core processors and 64g of ram on a workstation, so I wanted to veryify both quadcores were working as they should be

Reply

8 kangu January 19, 2010 at 6:51 pm

Thanks this was really very helpful! thanks

Reply

9 Uday January 22, 2010 at 7:06 am

Hi, nice info. But the thing is, i want this output in the batch mode.
top -n1 b

So how do i get all cpu in this mode? Till now i’ve been quite unsuccessful.
Basically i’ve written a script to capture the TOP output for techsupport. So there, interactive mode is not usefull.

Reply

10 Vikram September 10, 2010 at 12:35 am

First off, thanks a lot for this useful website – extremely helpful info, commands, tips and tricks.
I discovered, disappointedly though, that the %CPU column is “The percentage of a single CPU usage by the thread/process”. Now, to calculate the average CPU consumption, we need to divide this value by the number of CPUs. Is there a flag or option in “top” to make it show the average CPU consumption across all CPUs? I presume most people look at the column value and usually respond in alarm when a 2 processor machine or 2 core server is running at 100% whereas it is truly only consuming 50% of CPUs.

Reply

11 Pablo F. Carloni February 3, 2011 at 4:46 pm

Virkram,

The command to switch to total CPU consumption with top running in interactive mode (the usual mode) is ‘I’.
You might enter ‘I’ you will see the difference.

Reply

12 Vikram Kamath October 31, 2012 at 2:32 pm

Thanks!

Reply

13 jo June 3, 2013 at 11:04 am

How about top and then 1 – lists the cpus

Reply

Leave a Comment

Previous post:

Next post: