View Apache Server Status in Command Line CentOS 7
Systemctl Command Can be used to View Apache Server status in CentOS 7 while using Command line Interface.
systemctl status httpd.service
You should get an Output similar to below.
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: active (running) since Thu 2015-05-21 10:47:09 EDT; 14s ago
Main PID: 2842 (httpd)
Status: “Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec”
├─2842 /usr/sbin/httpd -DFOREGROUND
├─2843 /usr/sbin/httpd -DFOREGROUND
├─2844 /usr/sbin/httpd -DFOREGROUND
├─2845 /usr/sbin/httpd -DFOREGROUND
├─2846 /usr/sbin/httpd -DFOREGROUND
└─2847 /usr/sbin/httpd -DFOREGROUND
Loaded – This Tells whether Apache server has been installed or not. The value loaded mean apache has been installed. Value enabled at the end of the line indicates that apache has configured to run on Startup (When Computer Restart).
Active – This indicates the Current status. Active(running) means Apache is running right now. If the value is inactive (dead) means the server is not running.
If You use CentOS 6.5 or Early Versions, use service command to view apache server status as below.
service httpd status
httpd (pid 2246) is running…