Apache services can be monitored using the mod_status module, which is represented in the Apache configuration file httpd.conf asLoadModule status_module modules/mod_status.so. The previous # should be commented out to load the module. Press G to jump to the end of the configuration file and add<location/server-status>SetHandler Server-statusOrder Deny,allowDeny from Nothing allow from all</location>
Extendedstatus on
This will successfully load the Mod_status, enter the URL http://IP:PORT/server-status will be able to monitor the Apache service. here is the monitor that the page shows:
parameter Description:
Fields Description Server version Apache server version. Server built apache Server compiles the installation time. Current time present system time. Restart time apache restart time. The generation number of the parent Server generation apache father Process is the one that httpd received SIGHUP and restarted. Number. Server uptime apache the time elapsed since startup. Total accesses The amount of online and transmitted data that is currently received for this Apache. CPU usage Current CPU usage scenarios. _swss.... All Apache process current status. Each character represents a program and can display a maximum of 256 program states. Scoreboard key Description of the above status. The following is the meaning of each character symbol: * _: Wait for the link. * S: Start up. * R: Reading requirements. * W: Response is being sent. &nbSp * K: In the status of stay online. * D: Looking for DNS. * C: Closing the link. * L: Writing log file. * G: Enter the normal closing procedure. * I: Handling idle. *.: There is no such program. srv Generation number of this program with its parent program. pid Process ID for this program. acc Indicates the number of accesses that are processed by this program, respectively. m The current status of the program. cpu CPU resources consumed by the program. ss The time from the last processing request. req Time spent on the last processing request, in 1 per thousand seconds. conn The amount of data transmitted online. child The amount of data transmitted by the subroutine. slot The amount of data transmitted by the Slot. client The address of the client. vhost which virtual host or the IP of this host. request Online Request information.
Using the Mod_status module to monitor Apache services