Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Monitor 1

Status
Not open for further replies.

dba69

Technical User
Mar 19, 2005
5
Hi people. I am currently using pstat -p and sar to monitor CPU usage on SCO. Is there a more intelligent way of doing this ie. linking a user process to CPU usage eg top, monitor on AIX? Also what percentage value do I place on the CPU return value from pstat -p? Any assistance is greatly appreciated.
 
depending on what version and flavour of sco there are various incarnations of u386mon that show/monitor a number of different system areas.
 
It's not pretty, but this little script will show you which users are eating CPU time:

$ cat cpuhog
ps -e -o "pcpu" -o "pid=" -o "time" -o "user=" -o "args=" |
awk '$1 > 5' |
sort -r -n
 
Hi motoslide

Thanks for your script. One lat question. I receive the follwoing output. How do I intepret it. Thanks in advance.

93.70 5 00:00:00 root CPU2 idle process
92.01 4 00:00:00 root CPU1 idle process
83.27 6 00:00:00 root CPU3 idle process
81.06 7 00:00:00 root CPU4 idle process
27.48 558 04:30:32 root /usr1/informix/bin/oninit
 
The first column gives the percentage of CPU time a particular process is consuming. I hadn't run this on multiprocessor before. You might want to change it to ignore the idle processes. As written, you should see any process which is consuming more than 5%. This is just a snapshot in time. If you run the command repeatedly, the odds are very good that you'll get different processes displayed.
The second column is just the PID.
The third column is cummulated CPU time, since the process started.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top