cancel
Showing results for 
Search instead for 
Did you mean: 

HPUX top

SOLVED
Go to solution
Edmund Cheng
Occasional Visitor

HPUX top

I have read this from an old forum question.
I can use top -s50 -d30 -f tmp to record the cpu stats in a file tmp, is there any way to record all the process in that file as well? Or is there another alternative?

Thanx
3 REPLIES
Madhu Sudhan_1
Respected Contributor
Solution

Re: HPUX top

Hi Edmund !
Use the top command in the following way to get all the processes information into a file along with CPU information.

# top -s1 -d1 -n500 -f temp

in "-n" ensure to give a large number to get all the processes in to the file named with -f option.

Enjoy !
......Madhu
Think Positive
James R. Ferguson
Acclaimed Contributor

Re: HPUX top

Edmund:

For the problem you pose, in lieu of 'top', I would use 'ps'. Depending on what you want to see, choose your 'ps' options (see the man pages), and sort and filter the output further with 'awk' and 'grep'.

A very little known feature is how to use the XPG4 feature of 'ps', as documented in the man pages, is described in the post below (see Alan Riggs' last two posts therein).

As Alan states, the XPG4 behavior is invoked by setting and exporting the variable UNIX95=1.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: HPUX top

Hi (again):

Sorry, forgot to add the reference in the above:

http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x43667e990647d4118fee0090279cd0f9,00.html

...JRF...