Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

Can I make top show info about the web and db servers? Can it be done by piping the pids to the top? They can be many process from every one?!? Or is there any better method for this?

share|improve this question
up vote 3 down vote accepted

In the case of web and database users, they usually run as their own user. You can use the -u flag to show only processes running as a certain user like this: top -u mysql. You may also use the -p flag with a comma separated list of PIDs you want to follow like this: top -p 123,234,345.

You might also find htop more useful in this situation. Besides the options above it has much more flexible display options including following selected items so you don't loose them in the list. Once you setup your columns and sort order, turn on tree mode and then follow the parent of the server you are interested in. All it's children should show up just under the cursor.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.