LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   %CPU too high for process? (http://www.linuxquestions.org/questions/linux-general-1/cpu-too-high-for-process-866448/)

saiyen2002 03-04-2011 11:51 AM

%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


szboardstretcher 03-04-2011 11:55 AM

If you have a multicore processor, you will see percentages above 100, meaning that more than one core is in use by the processor.

saiyen2002 03-04-2011 01:50 PM

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

szboardstretcher 03-04-2011 01:59 PM

Quote:

Originally Posted by saiyen2002 (Post 4279231)
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.

saiyen2002 03-07-2011 03:27 AM

Thanks, you have been very helpful


All times are GMT -5. The time now is 07:24 AM.