limit number of process in top with non-interactive mode

Ian Mortimer ian at physics.uq.edu.au
Mon Sep 12 03:19:59 UTC 2005


On Fri, 2005-09-09 at 15:43 +0530, mnikhil m wrote:

> Top command in Linux is allowing to control the number of processes only in 
> the 
> interactive mode. I want to control the number of processes in 
> non-interactive batch 
> mode. Is there any other version of top available ? Or is there a way to do 
> so with 
> the current version itself? 
> 
> Note: Manual page for top is inappropriate with the command. 
> For example, "top 10" reports an improper use of command though it is valid 
> according to the man page. 

To see the top 10 processes you could do:

   top -bn1 | head -17


-- 
Ian




More information about the redhat-list mailing list