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

by Vivek Gite on September 20, 2006 · 11 comments

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)

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

We're here to help you make the most of sysadmin work. So, subscribe!

{ 11 comments… read them below or add one }

1 Arun September 20, 2006

Useful tips. Thanks.

Reply

2 Sonali May 21, 2007

Vivek,

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

Reply

3 Javantea October 3, 2007

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

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

It’s useful for me.

Thanks.

Reply

6 whocarez September 24, 2008

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

Reply

7 some guy July 14, 2009

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

Thanks this was really very helpful! thanks

Reply

9 Uday January 22, 2010

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

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

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

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 8 + 15 ?
Please leave these two fields as-is:
Are you a human being? Solve the simple math so we know that you are a human and not a bot.



Previous post:

Next post: