1748089 Members
4774 Online
108758 Solutions
New Discussion юеВ

Reg: top command

 
VEL_1
Valued Contributor

Reg: top command

Hi All,

In HP-UX, I can get top 100 process:

$ top -n 100
in screen,
j -> next screen # goes to next screen
k -> previous screen # # goes to next screen

But in linux, how can I get like the above?
3 REPLIES 3
Vitaly Karasik_1
Honored Contributor

Re: Reg: top command

you may use "n" or "#" for setting such number when top runs; I don't know if exists command-line parameter for this.
Raimo Lesonen_1
Advisor

Re: Reg: top command

If there's activity in the box, you can get the top 100 using command:
ps -ef|awk '$4>0'|sort -r -k 4,4|head -100
Mike Stroyan
Honored Contributor

Re: Reg: top command

You can also save different configurations by linking the top command to different names.

ln -s /usr/bin/top top100
./top100
#100Wq
./top100

The configuration will be save in ~/.top100rc and reused each time you start ./top100.

By the way, 100 is a lot of lines. You must be using a huge window with a tiny font.