一.监控Apache服务器上的资源使用情况
编辑httpd.conf,添加如下内容
ExtendedStatus On
LoadModule status_module modules/mod_status.so
<Location /server-status>
SetHandler server-status
Order deny,allow
Allow from .localhost
</Location>
浏览器中输入http://192.168.1.2/server-status?auto
显示如下信息,则表示配置成功
Total Accesses: 36926 Total kBytes: 3553573 CPULoad: .0538639 Uptime: 7389 ReqPerSec: 4.99743 BytesPerSec: 492470 BytesPerReq: 98544.6 BusyWorkers: 19 IdleWorkers: 6 Scoreboard: K_K..K.KKKK.WK_K..K.KKK_..._.....
无法获得idle servers和busy server数据,报错如下
Monitor name :Apache. Parsing error, cannot find token: IdleServers. Measurement: IdleServers| 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]
修改如下C:\Program Files\HP\LoadRunner\dat\monitors\apache.cfg
Counter0=IdleWorkers
Label0=#Idle Workers (Apache)
Counter4=BusyWorkers
Label4=#Busy Worker (Apache)
二.监控Unix/Linux
1. 安装 xinetd
yum install xinetd
启动 server xinetd start
2. 安装rsh
yum install rsh rsh-server
netstat -an |grep 514
如果能看到514在监听说明rsh服务器已经启动
3.安装rstatd
yum install rusers-server
启动 server rstatd start
查看状态 rpcinfo -p
要修改的是/etc/xinetd.d/下的三个conf文件 rlogin ,rsh,rexec 这三个配置文件,打这三个文件里的disable = yes都改成
disable = no ( disabled 用在默认的 {} 中 禁止服务)或是把# default: off都设置成 on 这个的意思就是在xinetd启动的时
候默认都启动上面的三个服务