UNIX Resources monitor

The UNIX Resources monitor shows the UNIX resources measured during the test run. This graph helps you determine the impact of Vuser load on the various system resources.

Configure the UNIX monitoring environment

This task describes how to configure the UNIX environment before setting up the UNIX monitor. The monitor can be configured with rstatd Daemon, or when non-mandatory credentials fields are supplied, it can be configured to access UNIX resources via the SSH protocol.

Configure the UNIX monitoring environment to allow access via the SSH protocol

  1. Make sure that authentication by password is enabled on your UNIX machine:

    1. Open /etc/ssh/sshd_config.

    2. Find the line that defines the password authentication property, and enable it.

      For example: PasswordAuthentication yes

      If this property is not defined, add it.

    3. Save the file and restart the sshd service.

  2. Verify that the following commands run on the UNIX machine without errors:

    /bin/cat /proc/stat| /bin/grep cpu | /usr/bin/head -n 1
    /bin/cat /proc/stat | /bin/grep btime
    /bin/cat /proc/uptime
    /bin/cat /proc/stat | /bin/grep ctxt
    /bin/cat /proc/vmstat | /bin/grep pgpgin -A 3
    /bin/cat /proc/loadavg
    /bin/cat /proc/net/dev | /usr/bin/head -n3 | /usr/bin/tail -n1
    /bin/cat /proc/stat | /bin/grep intr | /usr/bin/awk '{print $2}'
    /bin/cat /proc/meminfo | /bin/grep MemTotal -A 2
  3. Configure the monitor measurements as described in Set up the UNIX Resources monitor.

Configure the UNIX monitoring environment with rstatd Daemon

  1. Verify whether the rstatd daemon is already configured

    The rstatd daemon might already be configured, because when a machine receives an rstatd request, the inetd on that machine automatically activates the rstatd.

    • The rup command reports various machine statistics, including rstatd configuration. Run the following command on the UNIX machine 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.

  2. Configure the rstatd daemon

    If the rstatd daemon is not yet configured, follow these steps to configure it:

    1. On the UNIX machine, run the command: su root

    2. 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.

    3. From the command line, run:

    4. 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.

    5. Run rup again.

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

  3. Configure the monitor for a UNIX machine over a firewall (optional)

    To monitor a UNIX machine over a firewall, you must run a UNIX utility called rpcinfo and identify the rstatd's port number.

    Run rpcinfo -p <hostname>. You receive a list of all RPC servers registered in the host's portmapper, along with the port number. This list does 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. If are prompted to include a version number, specify versions 3 and 4.

  4. Configure the monitor measurements as described in Set up the UNIX Resources monitor.

Back to top

Set up the UNIX Resources monitor

This task describes how to set up the UNIX Resources monitor.

  1. Prerequisites

    If your monitor accesses a server outside of your internal network, you may need to set up a web proxy to collect data from it. For details, see Use a proxy server.

  2. Select a resources folder.

    Select a resources folder for the monitor profile in the resources tree, or create a new folder as follows:

    1. In the LoadRunner Enterprise masthead, click the module name or the dropdown arrow and select Monitors (under Assets).

    2. Click New Folder and enter a name for the monitor resources folder.

  3. Create a monitor profile.

    1. Click New Monitor Profile , and make sure Monitor Profile is selected.

    2. Enter a name and optional description for the monitor profile, and click Save. An empty monitor profile is added to the selected resources folder.

    3. Select the monitor profile you just added and click Add Monitor .

    1. In the Monitor Type Selection tab, select the UNIX Resources monitor type and click Next.

    2. In the Monitor Definition tab, enter the server details:

      UI Elements

      Description

      Server

      The name or IP address of the server whose resources you want to monitor.

      User Name

      Provide the monitored server's user name if you want to use the SSH protocol to connect to the resource. Otherwise, if left empty, rstatd is required to run the monitor.

      Password

      Provide the monitored server's password if you want to use the SSH protocol to connect to the resource. Otherwise, if left empty, rstatd is required to run the monitor.

    3. Click Get Counters to display a list of available metrics and counters.

      Select the measurements that you want to monitor, and then click to add the counters to the Selected Counters table.

      The following default measurements are available for the UNIX machine:

      Measurement

      Description

      Average load

      Average number of processes simultaneously in Ready state during the last minute.

      Collision rate

      Collisions per second detected on the Ethernet.

      Context switches rate

      Number of switches between processes or threads, per second.

      CPU utilization

      Percent of time that the CPU is utilized.

      Disk rate

      Rate of disk transfers.

      Incoming packets error rate

      Errors per second while receiving Ethernet packets.

      Incoming packets rate

      Incoming Ethernet packets per second.

      Interrupt rate

      Number of device interrupts per second.

      Outgoing packets errors rate

      Errors per second while sending Ethernet packets.

      Outgoing packets rate

      Outgoing Ethernet packets per second.

      Page-in rate

      Number of pages read to physical memory, per second.

      Page-out rate

      Number of pages written to pagefiles and removed from physical memory, per second.

      Paging rate

      Number of pages read to physical memory or written to pagefiles, per second.

      Swap-in rate

      Number of processes being swapped in.

      Swap-out rate

      Number of processes being swapped out.

      System mode CPU utilization

      Percent of time that the CPU is utilized in system mode.

      User mode CPU utilization

      Percent of time CPU is utilized in user mode.

    4. Click Save. The monitor details are displayed in the Monitors tab for the selected monitor profile.

  4. Associate the monitor with your test.

    For details, see Step 3: Associate monitors with your test.

Back to top

Notes and limitations

Problem: If rstatd is not running and credentials are not supplied (when credentials are provided, the SSH protocol is used instead of rstatd), the UNIX monitor does not work and returns the following error:

root@<LRE Server name>:~# rup <LRE Server name>
rup: RPC: Program not registered

Resolution:

  1. Install rstatd by running the command:

    sudo apt-get install rstatd
  2. Open the /etc/xinetd.conf file in a text editor and add the line:

    rstatd sunrpc_udp udp wait root /usr/sbin/rpc.rstatd rstatd 100001 1-3   
  3. Restart rstatd by running the command:

    /usr/sbin/rpc.rstatd start

  4. Verify rstatd is running on the localhost by running the command:

    rpcinfo -p localhost

Back to top

See also: