cancel
Showing results for 
Search instead for 
Did you mean: 

top ten processes

 
SOLVED
Go to solution
shikhar_1
Regular Advisor

top ten processes

Hi Everyone,

Whats the command for top ten processes in HP-UX?
I dont want to use "top" command as it is refreshing.
Is there any command which just give a o/p of top ten processes?
5 REPLIES
James R. Ferguson
Acclaimed Contributor
Solution

Re: top ten processes

Hi:

You could use 'top' and run it for one-cycle:

# top -d 1

Regards!

...JRF...
shikhar_1
Regular Advisor

Re: top ten processes

Hi,
Thanks for your reply.
I just wanted to know the command which gives the o/p of processes which is consuming more memory from ascending order.
James R. Ferguson
Acclaimed Contributor

Re: top ten processes

Hi:

If you prefer, then:

# UNIX95= ps -e -ovsz= -opid= -ocomm= | sort -knr1,1 | head -10

There is nothing but whitespace after the 'UNIX95=' and before the 'ps'. This keeps UNIX95 behavior set only for the commandline. To do otherwise may lead to different behavior than you want. The '-o' option selects the fields to display and the trailing '=' suppresses the field headers. The sort orders the process list in descending virtual memory size.

For the CPU usage, you could look at the cumulative execution time':

# UNIX95= ps -e -otime= -opid= -ocomm= | sort -kr1,1 | head -10

Regards!

...JRF...
shikhar_1
Regular Advisor

Re: top ten processes

Will these scommand work for OS vers. 11.11 & 11.23
James R. Ferguson
Acclaimed Contributor

Re: top ten processes

Hi (again):

> Will these scommand work for OS vers. 11.11 & 11.23

Absolutely.

Regards!

...JRF...