How to Check Apache (httpd) Web Server Uptime Using the ps Command on Linux

For RPM based systems:

pgrep httpd | head -1

For DEB based systems:

pgrep apache2 | head -1

Once you get the Apache PID, use the following command to get it.

ps -p 10915 -o etime

Once you have Apache PID, use the following proc file system to identify it. As per the below output the httpd process has been running since Oct  5 12:20

# ls -ld /proc/83997
dr-xr-xr-x 9 root root 0 Oct  5 12:20 /proc/83997

Related posts

Latest posts

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *