Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-16-2008, 05:34 AM   #1
LQ Newbie
Registered: Jun 2008
Posts: 2

Rep: Reputation: 0
How does ps report CPU on a quad core server?

Good morning,

Runnind redhat 2.6.18-92.el5.

Using command ps -eo pid,pcpu,args | grep PROCESS_NAME

To get the CPU usage for the named process.

Does anyone know if this is returned as a percent of the whole system's CPU or as a percent of the cpu the process is running in?

Thanks in advance.
Old 07-16-2008, 05:57 AM   #2
Registered: May 2003
Posts: 163

Rep: Reputation: 28
The following command
ps -eo pid,pcpu,args
will display the details as:
PID CPU Percentage the process command
Example for the following command:
$ ps -eo pid,pcpu,args | head -n 6
1 0.0 init
2 0.0 [migration/0]
3 0.0 [migration/1]
4 0.0 [migration/2]
5 0.0 [migration/3]
This will list for all the process and the output is redirected as input to head command.
From the head command the first six lines needs to be displayed.
Similarly the command:
ps -eo pid,pcpu,args | grep PROCESS_NAME
will do:
Display for all the process
the output will be redirected to grep command
Display the line containing the name(using grep command) "PROCESS_NAME", if that process (PROCESS_NAME) running.
Old 07-17-2008, 01:53 AM   #3
LQ Newbie
Registered: Jun 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the info but that is not what I am asking. I would like to know if the returned CPU percent is a percentage of the whole CPU of the server of of the actual core the process is running in.

Old 07-17-2008, 01:55 AM   #4
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,719

Rep: Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550
The latter - normalized metrics aren't that useful usually.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora Core 6 on Xeon Quad Core baddah Fedora 3 11-18-2007 09:09 AM
LXer: Intel Core 2 Extreme Quad-Core QX9650 LXer Syndicated Linux News 0 10-29-2007 07:50 PM
Fedora Core 6 - Support for Quad Core Xeon baddah Linux - Hardware 1 09-20-2007 05:20 PM
When will AMD new quad core CPU be on retail market satimis General 1 09-18-2007 08:13 AM
Will a 32-bit OS be able to handle 32GB of memory on a quad dual-CPU system? theitguy Linux - Hardware 3 07-27-2006 04:31 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration