Open mod_status
The configuration is as follows:
1. Modify the httpd. conf configuration file
<Location/Server-status>
Sethandler server-status
Order deny, allow
Deny from nothing
Allow from all
<Loclocation/Server-status>
Extendedstatus on
2. Restart Apache
3. Add Apache monitor to lR
We can also access http: // 127.0.0.1/Server-status on our website? Atuo or http: // 127.0.0.1/Server-Status?Refresh = NThe parameter can control the refresh frequency and view the Apache status information.
The following is an explanation of the preceding statement:
This sethandler statement tells Apache that once a matching request is received (in this example/Server-status), it is not used to find the corresponding file, instead, it is switched to the corresponding module or CGI for processing.
The mod_status module defines a server-status and extendedstatus ).
In the preceding configuration, when accessing the/Server-status resource, the current activity report of the server is provided.
The format is as follows:
W _________...................................... ................
........................................ ........................
........................................ ........................
........................................ ........................
W represents a subprocess that is responding, and _ represents the connection that idle subprocesses are waiting. Each vertex represents a potential sub-process that has not yet been generated. Each potentially usable service is expressed in this section.
He also tells you how long the system has been running since it was last started. If you need more information, enable the extendedstatus switch, which is disabled by default. After this switch is enabled, in addition to the above information, you can also get a list of each sub-process and its work. For each sub-process, you can obtain its PID, CPU usage, and running time. For the server, you can get the total clicks, CPU utilization, clicks per minute after the server starts, and the total bytes transmitted to the client.
3. Useful settings to view information about each module
#
# Allow Remote Server Configuration Reports, with the URL
# Http: // servername/Server-Info (requires that mod_info.c be loaded ).
# Change the ".example.com" to match your domain to enable.
#
# Cancel the annotator "#" in front of the code and set order (order) to allow priority.
<Location/Server-Info>
Sethandler server-Info
Order allow, deny
Deny from nothing
Allow from all
</Location>
Ii. settings on LoadRunner
After the first configuration, you can use LoadRunner to monitor the running status of Apache. Double-click the Apache node under Web server resource graphs in the monitor available for LoadRunner, then, add the IP address of the Apache host in the corresponding window on the right, add the counter, and click OK, so that the Apache running status information can be displayed in real time in LoadRunner.
Note: You may receive the following message [monitor name: Apache. parsing error, cannot find token: busyservers. measurement: busyservers | 192.168.0.186. hints: 1) such a measurement does not exist, or the HTML page may be different from the supported one. 2) try to replace the Apache. CFG with appropriate Apache _ <version>. cfg file in <installation> \ dat \ monitors and rerun the application (Entry Point: capachemeasurement: newdata ). [Msgid: MMSG-47479], because the counters provided by the apache version to be monitored are inconsistent with the default LoadRunner counters. In this case, we recommend that you disable controller and enable Apache under <installation> \ dat \ monitors. cfg file (other file names are similar to Apache _ <version>. CFG is a backup of Apache monitoring configuration, only Apache. CFG is effective ):
1. Modify counter0 = idleservers to counter0 = idleworkers, and modify the annotation information label0 = # idle servers (APACHE) to label0 = # idle workers (APACHE). We recommend that you modify the description;
2. Modify counter4 = busyservers to counter4 = busyworkers, and modify the annotation label4 = # Busy servers (APACHE) to label4 = # Busy workers (APACHE). We recommend that you modify the description.
Then save and close the file, re-open the controller and add a counter, so that the monitoring is normal.