Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

2 Answers 2

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.