LoadRunner系统资源监视

http://www.ltesting.net/ceshi/ceshijishu/rjcsgj/mercury/loadrunner/2013/0418/206165_3.html

---------------------------------------------------------------------------

1, Unix Resource Monitor:

  • Setting up the Monitoring Environment
    Ensure that the rstatd daemon is running on the UNIX machine

        首先 , 监视 Linux 一定要有 rstatd daemon 这个进程 , 有的 Linux 版本里也有可能是 rpc.rstatd 这里只是名字不同而已 , 功能是一样的。一般来说 LINUX 需要下载一个包才有这个服务 , 包名字是 rpc.rstatd-4.0.1.tar.gz. 这是一个源码 , 需要编译 . 下载并安装 rstatd

  • To verity whether the rstatd daemon is already configured:

The rup command reports various machine statistics, including rstatd configuration. Run the following command to view the machine statistics: >rup host

You can also use lr_host_monitor and see if it returns any relevant statistics.

If the command returns meaningful statistics, the rstatd daemon is already configured and activated. If not, or if you receive an error message, the rstatd daemon is not configured.

  • To configure the rstatd daemon:

         Run the command: su root

        Go to /etc/inetd. conf and look for the rstatd row (it begins with the word rstatd). If it is commented out (with a #), remove the comment directive, and save the file.

        From the command line, run: kill -1 inet_pid .

where inet_pid is the pid of the inetd process. This instructs the inetd to rescan the /etc/inetd.conf file and register all daemons which are uncommented, including the rstatd daemon.

        Run rup again.

If the command still does not indicate that the rstatd daemon is configured, contact your system administrator.

  • To monitor a UNIX machine through a firewall, you must run a UNIX utility called rpcinfo and identify the rstatd ’ s port number. By running rpcinfo -p , you will receive a list of all RPC servers registered in the host ’ s portmapper, along with the port number. This list will not change until rstatd is stopped and rerun.

    Some firewalls allow you to open an RPC program number instead of a port.In such cases, open program 100001.

2, WebsPhere Monitor

  • Ensure that the PerfServletAPP.ear is running on the WAS server
  • Setting from Websphere Admin Console

Go to Servers > Application servers > Your server > Performance > Performance Monitoring Infrastructure (PMI)
make sure Currently monitored statistic set is set to the level higher than None (Basic is ok)

3, Apache monitor for  Web Server
  • Open <Apache Installation>conf httpd.conf , Make the following changes :

         Configure the host which show the status of Apache
      #
      # Allow server status reports, with the URL of   http://servername/server-status
      # Change the ".your-domain.com" to match your domain to   enable.
      #
      Delete the annotation symbol “#” which in front of these code ,and set the order to allow priority
      <Location /server-status>
       SetHandler server-status
       Order allow,deny
       Deny from nothing
       Allow from all
      </Location>

  • Restart   Apache server after these changes, in the browser enter http://servername/server-status   be able to see Apache run-time information. Then input http://servername/server-status?auto   will see the following information: (http://123unix.cnblogs.com/server-status?auto)

      Total   Accesses: 124
  Total Kbytes: 444
     CPULoad: 3.32432
     Uptime: 37
  ReqPerSec: 3.35135
     BytesPerSec: 12288
      BytesPerReq: 3666.58
      BusyWorkers: 1
      IdleWorkers: 7
      Scoreboard: ____W___.........................
    To see such information, the configuration is successful , so that you   can monitor Apache in Loadrunner

4, Oracle Monitor

The Oracle monitor displays information from Oracle V$ tables: Session statistics, V$SESSTAT, system statistics, V$SYSSTAT, and other table counters defined by the user in the custom query.

  • To set up the Oracle monitor environment:

  1).Ensure that the Oracle client libraries are installed on the Controller or Tuning Console machine

      2).Verify that %OracleHome%in is included in the path environment variable. If it is not, add it.

      3).Configure the tnsnames.ora file on the Controller machine

      4).Obtain a username and password for the service from your database administrator

      5). Ensure that the schema user has been granted read access on V$ tables (V$SESSTAT, V$SYSSTAT, V$STATNAME, V$INSTANCE, V$SESSION, V$PROCESS).

      6).Verify connection with the Oracle server by performing tns ping from the Controller

      7).Ensure that the registries are updated for the version of Oracle that you are using and that they have the following key: HKEY_LOCAL_MACHINESOFTWAREORACLE

       8).Run SQL*Plus from the Controller or Tuning Console and attempt to log in to the Oracle server(s) with the desired username/password/server combination.

       9).Type SELECT * FROM V$SYSSTAT to verify that you can view the V$SYSSTAT table on the Oracle server. Use similar queries to verify that you can view the V$SESSTAT, V$SESSION, V$INSTANCE, V$STATNAME, and V$PROCESS tables on the server. Make sure that the Oracle bin directory is in the search path.

 
原文地址:https://www.cnblogs.com/xiaoxiapier/p/4512229.html