lr如何监控linux,LoadRunner如何监控Linux系统资源
一 簡述:LoadRunner監控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.
上述問題的實質是Linux系統中未安裝rpc.rstatd,服務未開啟的原因造成。
于是接下來就驗證我們的推測:
首先查看rpc.rstatd是否安裝
以下是代碼片段:
[root@localhost bin]# whereis rpc.rstatd
如果列表中沒有rpc.rstatd
發現系統未安裝rpc.rstatd
備注:rstatd Rstat協議允許網絡上的用戶獲得同一網絡上各機器的性能參數。
二 準備下載包:下載rpc.rstatd-4.0.1.tar.gz安裝包
下載地址:http://sourceforge.net/projects/rstatd
利用ssh客戶端上傳rpc.rstatd-4.0.1.tar.gz包至Linux下/home/Michael/tool/目錄下
三 執行安裝程序包:
以下是代碼片段:
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目錄中
Vi rlogin //編輯disable=no,保存
Vi rsh // 編輯disable=no,保存
Vi rexec //編輯disable=no,保存
六 啟動rpc.rstatd和檢測
以下是代碼片段:
rpc.rstatd //啟動rpc.rstatd進程
rpcinfo –p // 執行此命令檢查rpc服務的狀態
[root@localhost xinetd.d]# rpcinfo -p
程序版本協議 端口
program vers proto ? port ?service
100000 ? ?4 ? tcp ? ?111 ?portmapper
100000 ? ?3 ? tcp ? ?111 ?portmapper
100000 ? ?2 ? tcp ? ?111 ?portmapper
100000 ? ?4 ? udp ? ?111 ?portmapper
100000 ? ?3 ? udp ? ?111 ?portmapper
100000 ? ?2 ? udp ? ?111 ?portmapper
100024 ? ?1 ? udp ?40879 ?status
100024 ? ?1 ? tcp ?53726 ?status
100001 ? ?5 ? udp ? ?899 ?rstatd
100001 ? ?3 ? udp ? ?899 ?rstatd
100001 ? ?2 ? udp ? ?899 ?rstatd
100001 ? ?1 ? udp ? ?899 ?rstatd
看到rstatd,就說明rstatd服務已經啟動??梢杂肔R去監視了。
七 利用Loadunner中的Controller監控Linux資源
1 在controller中,將Systeme Resourece Graphs中的UNIX resources拖到右鍵的資源監控區域
2 鼠標右鍵選擇Add Measurements,添加被監控linux的IP地址192.168.52.189,選擇需監控的性能指標,確認后,如下圖所示即表示成功^_^
可能有的會提示計算機上訪問度量cpu utilization的數據,這個是因為你沒有這個資源度量,你在添加計算機的時候在下面重新添加資源度量cpu和你需要的相關信息就OK了
總結
以上是生活随笔為你收集整理的lr如何监控linux,LoadRunner如何监控Linux系统资源的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: idea直连linux部署项目,idea
- 下一篇: 2019世界钢琴家排名前十位