Steps to monitor Apache using LoadRunner

xiaoxiao2021-03-31  209

First, set on apache

Open /conf/httpd.conf, make the following modifications:

1. Set the host to allow the host to view the Apache

#

# Allow Server Status Reports, with the url of http: // Servername / Server-Status

# Change the ".your-domain.com" to match your domain to enable.

#

# Cancel the comment symbol "#" in front of the code, and set the order of Order to allow priority

SetHandler Server-Status

ORDER ALOW, DENY

Deny from Nothing

ALLOW FROM ALL

This will then restart Apache in the browser to enter http: // servername / server-status, you can see the information at the Apache runtime, and enter 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 BYTESPERSEC: 12288 BYTESPERSEC: 12288 BYTESPERSEC: 12288 BYTESPERSEC: 3666.58 BusyWorkers: 1 IdleWorkers: 7 scoreboard: ____ w ___.................... .......

Seeing such information means a successful modification, so you can use the LoadRunner to monitor Apache.

The following two steps are not related to the use of LoadRunner to monitor Apache, you can skip you.

2, change the setting of Apache, open the detailed status switch;

#

# ExtendedStatus Controls WHether Apache Will Generate "Full" status

# Information (ExtendedStatus on) or Just Basic Information (ExtendedStatus

# OFF) WHEN The "Server-Status" Handler IS Called. The default is off.

#

# Cancel the comment symbol "#" in front of the following line

Extendedstatus on

3, useful settings, view each module information

#

# Allow Remote Server Configuration Reports, with the URL of

# Http:// Servername / Server-info (Requires That MOD_INFO.C Be loaded).

# Change the ".example.com" to match your domain to enable.

#

# Cancel the comment symbol "#" in front of the code, and set the order of Order to allow priority

SetHandler Server-InfoRder, Deny

Deny from Nothing

Allow from all

Second, the settings on LoadRunner

After the above first setup, you can use the LoadRunner monitoring Apache's operation. Double-click the Apache node under Web Server Resource Graphs in the monitor, and then add the IP address of the host where Apache is located in the corresponding window. And then add the counter, click OK so that you can display the operating status information of Apache in real time in the loadrunner.

Note: You may receive the following message [Monitor name: Apache Parsing error, can not 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_ .cfg file in / dat / monitors and rerun the application (entry point: CApacheMeasurement :: NewData) [MsgId:. MMSG-47479 ]】, This is because the counter provided by the Apache version is not uniformly caused by the default counter with the LoadRunner. At this point, it is recommended to close the controller, open the Apache.cfg file under / DAT / MONITORS (other file name Similar Apache_ .cfg is a backup of Apache monitoring configuration, only apache.cfg is effective):

1. Modify Counter0 = IDleServers for counter0 = iDleWorkers, and modify the annotation information label0 = # idle servers (apache) is label0 = # idle workers (apache), and the description information is also recommended to modify;

2. Modify counter4 = busyservers for counter4 = busyworkers, and modify the comment information label4 = # busy servers (Apache) is label4 = # busy workers (apache), and the description information is also recommended to modify.

Then save and close the file, reopen the Controller and add a counter so that the monitor is normal.

转载请注明原文地址:https://www.9cbs.com/read-131031.html

New Post(0)