Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

Reg: top command

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?
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.

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

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.