Operating System - HP-UX
1822497 Members
2886 Online
109642 Solutions
New Discussion юеВ

AIX ps -eo equivalent - Process CPU Hogging

 
SOLVED
Go to solution
HP System Handle Owner
Occasional Advisor

AIX ps -eo equivalent - Process CPU Hogging

Hi all,

There is a feature of AIX where you can use ps -eo to identify processes that may be hogging the processors. On our HP-UX server, I'm only seeing STIME for start time when I need to see ETIME for elapsed time. - Any ideas how I can get this information or pickup processes that may be hogging CPU?
-o on man ps talks about only being available on XPG4 systems ?

This is for Tivoli end point to pickup and report information

Thanks in advance
I'll allocate scores out upon as neccessary
Cheers

Russ
Not another questionnaire !!
3 REPLIES 3
Stefan Farrelly
Honored Contributor
Solution

Re: AIX ps -eo equivalent - Process CPU Hogging

UNIX95= ps -eo "pcpu ruser comm"|sort -rn|more


This will list processes in order of most cpu usage first.
Im from Palmerston North, New Zealand, but somehow ended up in London...
RAC_1
Honored Contributor

Re: AIX ps -eo equivalent - Process CPU Hogging

UNIX95= ps -ef -o "comm,etime,stime,time,cpu"|sort -nk5.

Process sorted on cpu usage.

man ps for details.

Anil
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor

Re: AIX ps -eo equivalent - Process CPU Hogging

XPG4 behavior is enabled by defining the "UNIX95" env variable. You can do this for a single command thusly:

UNIX95= ps -e -o comm,etime

Note the space between the UNIX95= and the command. Other desired fields can be added to the comma separated list of -o arguments.
If it ain't broke, I can fix that.