LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-04-2011, 12:51 PM   #1
saiyen2002
Member
 
Registered: Dec 2006
Location: London, UK
Distribution: Centos, Fedora
Posts: 50

Rep: Reputation: 0
%CPU too high for process?


I am using centos 5, Kernel 2.6.18-53.el5. I am using 2 quad core processor with 4gb of ram

I am trying to figure out the significance of %CPU in the ps command.

My astreisk process %CPU is very high at the moment, at 115. I want to know if it is a cause for concern? If I do a top then the load of the box is very low.


Code:
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      2872  115  1.4 628664 58372 ?        Sl   14:56 190:30 /usr/sbin/asterisk -f -vvvg -c

Last edited by saiyen2002; 03-04-2011 at 12:52 PM. Reason: giving extra information
 
Old 03-04-2011, 12:55 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,369
Blog Entries: 1

Rep: Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088
If you have a multicore processor, you will see percentages above 100, meaning that more than one core is in use by the processor.
 
Old 03-04-2011, 02:50 PM   #3
saiyen2002
Member
 
Registered: Dec 2006
Location: London, UK
Distribution: Centos, Fedora
Posts: 50

Original Poster
Rep: Reputation: 0
Thanks for that, now i know i dont have to worry about this,

Can you elaborate further on what %CPU is? reading the man pages about the time of process and how much cpu used doesn't really make much sense to me.

thanks
 
Old 03-04-2011, 02:59 PM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,369
Blog Entries: 1

Rep: Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088
Quote:
Originally Posted by saiyen2002 View Post
Thanks for that, now i know i dont have to worry about this,

Can you elaborate further on what %CPU is? reading the man pages about the time of process and how much cpu used doesn't really make much sense to me.

thanks
First off, I have an asterisk server on Centos on a multi core system, I see it pegging out at around 180%, so I imagine that this is normal operation for Asterisk.

As far as CPU% -- well, its the percentage of the Processor that is being utilized by a particular process. One way to look at it is this: your CPU is 4.0GHZ, if a process is using 50%, then it is using 2GHZ, and leaving 2GHZ for other processes. Remember that linux is a timesharing system, so processes generally share time on the processor -- sharing speed -- more or less.

If you have multi cores-- say 4,.. then you can and will see numbers up to 400% usage. Now, the numbers in your "top" output, idle, sys, user are your averages over time -- not this very second.
 
1 members found this post helpful.
Old 03-07-2011, 04:27 AM   #5
saiyen2002
Member
 
Registered: Dec 2006
Location: London, UK
Distribution: Centos, Fedora
Posts: 50

Original Poster
Rep: Reputation: 0
Thanks, you have been very helpful
 
  


Reply

Tags
centos, cpuusage, ps


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
process is hanging on high cpu load even if its priority is set to the maximum yucefrizk Linux - Enterprise 16 06-23-2010 03:34 AM
Kill process with high CPU usage after X time? touser Linux - Newbie 4 12-27-2009 10:52 PM
[SOLVED] High cpu utilisation for X process in -current rpedrica Slackware 4 09-21-2009 10:08 AM
high cpu usage on process "event/0" rioch Linux - Laptop and Netbook 6 05-03-2006 04:03 PM
X Process: Occasional High CPU Load Fahrion Linux - Software 6 07-16-2005 07:47 PM


All times are GMT -5. The time now is 09:35 PM.

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