Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Linux command top -p option can allow up to 20 processes. Is there any way that I can specify more than 20 process?

Something like top -pN1 -pN2 .... -pN30

share|improve this question

migrated from Dec 10 '10 at 0:55

This question came from our site for professional and enthusiast programmers.

Checkout the htop, it has nice scrolling, colors and everything.

(although this question should be on SuperUser rather that stackoverflow)

share|improve this answer
in fact, i have to use the output of the top command on my perl scripts, so i cannot use htop to do this job – Anonymous Dec 8 '10 at 9:08

Interactive programs are a bad source of input to scripts. I strongly advice you to consider ps(1) utility; it has a lot of different process selection options, can output arbitrary column set with fine-tuned field formatting, can do sorting.

share|improve this answer
please accept the answer if it helped – ulidtko Dec 8 '10 at 18:13

You must log in to answer this question.