LoadRunner如何監控Linux下的系統資源
阿新 • • 發佈:2018-04-09
etc sys serve host 下載 系統資源 性能 str login 1. 安裝rsh,rsh-server
[root@localhost /]# yum install rsh
[root@localhost /]# yum install rsh-server
或者
[root@localhost /]#yum -y install rsh*
繼續安裝yum -y install gcc gcc-c++
註意:
2. 安裝rstatd 下載並安裝rstatd,下載地址:http://sourceforge.net/projects/rstatd(下載rpc.rstatd-4.0.1.tar.gz),上傳至/usr/local 查看是否安裝,一般來說Linux都沒有安裝 [root@localhost /]# find / -name rpc.rstatd 安裝rstatd [root@localhost /]# tar -xzvf rpc.rstatd-4.0.1.tar.gz
[root@localhost /]# cd rpc.rstatd-4.0.1
[root@localhost /]# ./configure 這裏會提示失敗給了權限;安裝gcc後再./configure 還是失敗;
繼續安裝yum -y install gcc gcc-c++
還是失敗;繼續yum -y install gcc automake autoconf libtool make
再./configure,看下圖,顯示成功
[root@localhost /]# make
[root@localhost /]# make install
3. 安裝完成後配置rstatd目標守護進程xinetd,配置文件於/etc/xinet.d目錄下修改/etc/xinetd.d目錄下面的3個conf(rogin,rsh,rexec)中的disable均設置為no [root@localhost /]# cd /etc/xinetd.d --進入/etc/xinetd.conf目錄中 [root@localhost /]# vi rlogin --編輯disable=no,保存 [root@localhost /]# vi rsh --編輯disable=no,保存 [root@localhost /]# vi rexec --編輯disable=no,保存 4. 啟動rpc.rstatd [root@localhost /]# rpc.rstatd --啟動rpc.rstatd進程
portmap在centos6中改名為rpcbind
yum install rpcbind(centos6)
yum install portmap(centos5)
我的是centos6,所以安裝yum install rpcbind(一般系統本身就帶有rpcbind)
在檢查一下
[root@localhost /]# rpcinfo -p --執行此命令檢查rpc服務的狀態 到這裏為止,LR監控Linux必要的服務都已安裝好了。
如上圖可以看到,如果開啟了四個rstatd服務就說明,該rpc守護進程服務啟動是成功的(服務安裝和啟動是成功的)
5. 關閉防火墻 [root@localhost /]# iptables -L 查看防火墻狀態 [root@localhost /]# service iptables stop
chkconfig iptables on //永久性啟動防火墻
chkconfig iptables off //永久性關閉防火墻
6. LR中的Controller監控Linux資源 在Controller中,將System Resource Graphs中的Unix resources拖到右側的資源監控區域。鼠標右鍵選擇Add Measurements,添加被監控Linux的IP地址x.x.x.x,選擇需要監控的性能指標,確認。
參考:
http://www.51testing.com/html/29/279629-3693914.html
https://blog.csdn.net/kellyruan/article/details/51498530
LoadRunner如何監控Linux下的系統資源