1

This is a screenshot of TOP command on my server.

Which one of the processes are for Apache? Can't see any httpd

enter image description here

2

Your image is incomplete, and shows no apache processes. After you start top, issue the i command to suppress "idle" processes.

  • Thanks, after doing so, upon visiting the site, I saw the process. – tony9099 Apr 5 '17 at 15:16
2

The other way to accomplish this is filtering out the process:

top -c -p `pgrep apache2 -d','`
  • -d switch in pgrep command defines the separator. we use comma to get a list of process like this: 123,124,125.
  • -p in top monitor only processes with specified process IDs.
  • -c reverses the state of name filed, the default is process name, so it will change it to path lile: /usr/bin/httpd.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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