LoadRunner如何監控Linux系統資源

http://www.cnblogs.com/mayingbao/archive/2011/12/27/429187.html


 簡述: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

備註: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目錄下面的3conf (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
    
程序版本協議   端口
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  32768  status
    100024    1   tcp  32769  status
    100001    5   udp    867  rstatd
    100001    3   udp    867  rstatd
    100001    2   udp    867  rstatd
    100001    1   udp    867  rstatd


   七 利用Loadunner中的Controller監控Linux資源
1  在controller中,將Systeme Resourece Graphs中的UNIX resources拖到右鍵的資源監控區域
2  鼠標右鍵選擇Add Measurements,添加被監控linux的IP地址192.168.52.189,選擇需監控的性能指標,確認後,如下圖所示即表示成功^_^


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章