First, Apache on the settings
Open <apache installation>/conf/httpd.confand make the following modifications:
1. set up hosts that allow viewing Apache running status
#
# Allow server status reports, with the URL of Http://servername/server-status
# change the '. your-domain.com ' to match your domain to enable.
#
# Uncomment the comment symbol "#" Before the code, and set order (order) to allow precedence
<Location/server-status>
SetHandler Server-status
Order Allow,deny
Deny from Nothing
Allow from all
</Location>
This change will restart Apache after you enter http://servername/server-status in the browser to see the Apache Runtime information, and enter the http ://servername/server-status?auto will see the following information:
Total accesses:124 Total kbytes:444 cpuload:3.32432 Uptime:37 reqpersec:3.35135 bytespersec:12288 bytesperreq:3666.58 Busyworkers:1 Idleworkers:7 Scoreboard: ____w___ .....-----------... |
Seeing this information indicates a successful modification, so you can use LoadRunner to monitor Apache .
The following two steps are not related to using LoadRunner to monitor Apache and can be skipped.
2. change Apache settings, turn on verbose status switch;
#
# Extendedstatus Controls whether Apache would generate "full" status
# information (Extendedstatus on) or just basic information (extendedstatus
# OFF) When the ' Server-status ' handler is called. The default is OFF.
#
# cancels the comment symbol "#" before the following line
Extendedstatus on
3. useful settings to view the information for each module
#
# Allow remote server configuration reports, with the URL of
# Http://servername/server-info (requires that MOD_INFO.C is loaded).
# change the '. example.com ' to match your domain to enable.
#
# Uncomment the comment symbol "#" Before the code, and set order (order) to allow precedence
<Location/server-info>
SetHandler Server-info
Order Allow,deny
Deny from Nothing
Allow from all
</Location>
Second, the setting on theLoadRunner
After the first setting above, you can use LoadRunner to monitor the operation of Apache , and in LoadRunner available monitors, double-click Web Server Resource Graphs the Apache node below, then add the IP address of the Apache Host in the corresponding window on the right, and click OKafter adding the counter, so you can LoadRunner shows Apache 's running status information in real time.
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 is 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]"This is due to the monitoringApacheThe version provides the counter with theLoadRunnerThe default counter inconsistency is the result. It is recommended that you first closeControllerOpen it<installation>/dat/monitorsUnder theapache.cfgFile (other file names are similarapache_<version>.cfgis theApacheMonitoring a backup of the configuration, onlyapache.cfgis in force):
1. Modify the counter0=idleservers to counter0=idleworkers, while modifying the annotation information label0= #Idle Servers (Apache) For label0= #Idle Workers (Apache), descriptive information is also proposed for modification;
2. Modify the counter4=busyservers to counter4=busyworkers, while modifying the annotation information label4= #Busy Servers (Apache) For label4= #Busy Workers (Apache) , descriptive information is also recommended for modification.
Then save and close the file, reopen the Controller and add the counters so that the monitoring is OK.
Steps to monitor Apache using LoadRunner (GO)