↑ ↓ select, Enter open, Esc close

Count running Apache processes

user@server
ps -C apache2 --no-headers | wc -l

Counts all processes named apache2, meaning the parent process and its children. If the number climbs to the configured limit under load, requests start to queue. With the event MPM the process count says less than with prefork, since each process serves many threads.

Note: ps -C apache2 -o rss= | awk '{s+=$1} END {print s/1024 " MB"}' shows the memory usage.

Also searched as

  • how many apache processes are running
  • count apache child processes
  • check apache load linux

Related one-liners

All in Apache

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.