10-17-2011 11:30 PM
We need to track the CPU utilization in UNIX system [find out any process affects the performance of the system] and for that can you provide the commands that can be used? FYI - vmstat/top/glance does not work in the UNIX system that we use.
Also, can you tell about the use of 'ps -e -o pcpu -o pid -o user -o args' & sar command? what do we interpret from 'ps -e -o pcpu -o pid -o user -o args' command? For eg. if we have three different processes having the below usage:
33% <process 1>
33% <process 2>
33% <process 3>
what does it indicate?
Thanks in advance.
10-18-2011 05:25 AM
> FYI - vmstat/top/glance does not work in the UNIX system that we use.
That is not descriptive at all. I think you mean that whatever data you are examining from these tools doesn't lead you to the answer you want.
> what do we interpret from 'ps -e -o pcpu -o pid -o user -o args' command?
This is UNIX95 (XPG4) behavior. If you are truly running HP-UX you will need to set UNIX95. The safe way to do this is only for the duratation of the command line needing it:
# UNIX95= ps -e -o pcpu -o pid -o user -o args
Notice the whitespace after the "=" and before the 'ps' command.
The manpages are your friend. Read them. The 'ps' command above says to look at every process ('-e') and return the 'pcpu', 'pid', 'user' and 'args' for that process as columns in the output. THis is known as creating a custom output format. Read the manpages!
10-18-2011 09:58 AM
>if we have three different processes having the below usage, what does it indicate?
It could indicate you only have one CPU and the same/similar process is running and getting equal shares.