LoadRunner如何監(jiān)控Linux系統(tǒng)資源
一 簡述:LoadRunner監(jiān)控Linux資源時彈出如下錯誤:
Monitor name :UNIX Resources. Cannot initialize the monitoring on 192.168.52.189. Error while creating the RPC client. Ensure that the machine can be connected and that it runs the rstat daemon (use rpcinfo utility for this verification). Detailed error: RPC: Failed to create RPC client.
RPC-TCP: Failed to establish RPC server address.
上述問題的實質(zhì)是Linux系統(tǒng)中未安裝rpc.rstatd,服務未開啟的原因造成。
于是接下來就驗證我們的推測:
首先查看rpc.rstatd是否安裝
[root@localhost bin]# whereis rpc.rstatd
發(fā)現(xiàn)系統(tǒng)未安裝rpc.rstatd
備注:rstatd Rstat協(xié)議允許網(wǎng)絡上的用戶獲得同一網(wǎng)絡上各機器的性能參數(shù)。
二 準備下載包:下載rpc.rstatd-4.0.1.tar.gz安裝包
下載地址:http://sourceforge.net/projects/rstatd
利用ssh客戶端上傳rpc.rstatd-4.0.1.tar.gz包至Linux下/home/Michael/tool/目錄下
三 執(zhí)行安裝程序包:
tar -xzvf rpc.rstatd-4.0.1.tar.gz //解壓rcp.rstatd
cd rpc.rstatd-4.0.1//進入到rpc.rstatd目錄中
./configure //配置rc.rstatd的安裝,以下我的是按照默認方式的
make //編譯rc.rstatd
make install // 安裝
四 重啟xinetd
/etc/init.d/xinetd restart
五 修改etc/xinetd.d目錄下面的3個conf (rlogin, rsh, rexec)中的disable置均設置為no
cd /etc/xinetd.d //進入到etc/xinetd.conf目錄中
Virlogin //編輯disable=no,保存
Virsh// 編輯disable=no,保存
Virexec //編輯disable=no,保存
六 啟動rpc.rstatd和檢測
rpc.rstatd//啟動rpc.rstatd進程
rpcinfo –p // 執(zhí)行此命令檢查rpc服務的狀態(tài)
[root@localhost xinetd.d]# rpcinfo -p
程序版本協(xié)議 端口
1000002 tcp111 portmapper
1000002 udp111 portmapper
1000241 udp 32768 status
1000241 tcp 32769 status
1000015 udp867 rstatd
1000013 udp867 rstatd
1000012 udp867 rstatd
1000011 udp867 rstatd
七 利用Loadunner中的Controller監(jiān)控Linux資源
1 在controller中,將Systeme Resourece Graphs中的UNIX resources拖到右鍵的資源監(jiān)控區(qū)域
2 鼠標右鍵選擇Add Measurements,添加被監(jiān)控linux的IP地址192.168.52.189,選擇需監(jiān)控的性能指標,確認
【編輯推薦】