Get count of running apache processes
Original post on my tumblr.
$ pgrep apache2 | wc -l
Explanation:
pgrep will search processes just like "grep". Above, I am searching for processes which match "apache2". You may want to search for "http" or "httpd" if apache2 isn't what your Apache processes is called.
wc -l WC will print newline, word or byte counts for a file or piped in content. The -l flag specifically prints the newline count.
Combined, this command will list the number of apache2 processes currently running.
Written by Chris Fidao
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Terminal
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#