Enabling Performance Monitoring

Applies to TestComplete 14.70, last modified on April 22, 2021

This topic describes how to configure computers so that they provide their performance parameters to TestComplete.

Configuring Windows Computers

Windows computers provide access to their performance parameters via the Performance Data Helper (PDH) component. In order for TestComplete to be able to use the PDH component, the monitored computer must be configured in a specific manner.

Common Requirements

  • The monitored computer must belong to a Windows domain.

  • The user account under which TestComplete is running must belong to one of the following user groups on the monitored computer:

    • Administrators
    • Performance Monitor Users
    • Performance Log Users
    Note: On Windows XP, the Performance Monitor Users and Performance Log Users groups are not available; use the Administrators group instead.
  • TestComplete must be able to read the following registry keys on the monitored computer:

    • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Perflib
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg

    The read permissions can be granted either to the user account under which TestComplete is running or to one of the groups on the monitored computer to which this account belongs.

Additional Requirements for Remote Computers

To monitor performance counters on a remote computer, the following additional requirements must be met:

  • If the TestComplete computer and the remote computer are in different domains, these domains must have a two-way trust relationship.

  • The following services must be enabled and running on the remote computer:

    • File and Printer Sharing for Microsoft Networks
    • Remote Registry
      Note: The Remote Registry service is disabled by default on Windows Vista and later operating systems.
    • Server
  • TCP ports 139 and 445 must be allowed through the firewall on the remote computer.

  • The following files must exist on the remote computer:

    • <Windows>\System32\Perfc009.dat
    • <Windows>\System32\Perfh009.dat

    Also, the user account under which TestComplete is running or one of the groups to which the user belongs on the remote computer must have at least read permissions for these files.

  • The HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Perflib\009 registry key on the remote computer must contain the Counter value with a list of available performance counters.

Additional Requirements for the Local Computer

To monitor performance counters on the local computer where TestComplete is running, the following additional requirements must be met:

Configuring Unix Computers

UNIX-based operating systems may publish their resource usage through the Rstat (remote statistics) interface. Performance statistics are retrieved from the kernel by the rstatd background process (daemon according to the UNIX terminology).

The rstatd daemon can already be installed and running on most UNIX operating systems. Therefore, you can check whether the rstatd daemon is already running. Use the following command:

rup host

The command should report various machine statistics, including the rstatd configuration.

If you fail to retrieve the statistics, you will need to install and configure the rstat daemon:

  • Download the rstatd source code from the Rstatd 4 Linux Sourceforge site.

  • Extract the downloaded archive and compile the package following the instructions outlined in the install file of the extracted folder.

    The console commands will look like this:

    $ tar xvzf rstatd.tar.gz
    $ cd rpc.rstatd
    $ ./configure --prefix=/usr
    $ make
    # sudo su
    # make install

  • Add a line to the hosts.allow file within the /etc/ section to specify the subnet(s) allowed to make rstatd requests. For example:

    rpc.rstatd: 10.0.95.0/255.255.255.0 10.0.8.0/255.255.255.0

  • The rstat daemon is normally invoked by another daemon - inetd (or xinetd in some Linux distributions). Using a terminal, change directories to /etc/inetd.d and create a file called rstatd having the following contents:

    # default: off
    # description: An xinetd internal service which rstatdā€™s characters back to clients.

    service rstatd
    {
    type = RPC
    rpc_version = 2-4
    socket_type = dgram
    protocol = udp
    wait = yes
    user = root
    only_from = 10.0.95.0/24
    log_on_success += USERID
    log_on_failure += USERID
    server = /usr/sbin/rpc.rstatd
    disable = no
    }

    Make sure that the value specified by the server parameter is actually where the rpc.rstatd daemon is installed. If it is not installed to /usr/sbin, change the parameters above to reflect this configuration.

  • Restart the inetd (or xinetd) daemon:

    # /etc/rc.d/init.d/inetd restart

    Now, rstatd should be running.

Configuring Apache Servers

The Apache Web server may publish its performance statistics to a special web page. The default URL is http://servername/server-status. TestComplete can retrieve the published information and parse out the counter values from it.

To enable publishing of the server status, follow the steps below:

  • Open the apache configuration file at: <Apache>/conf/httpd.conf.

  • Search for the "mod_status" text or scroll down until you find a line containing:

    LoadModule status_module modules/mod_status.so

    If there is the "#" character in front of the line, the line is commented out, and consequently, the corresponding module is not loaded. Remove # to load the mod_status module.

  • Find the following section in the httpd.conf file:

    # Allow server status reports generated by mod_status,
    # with the URL of http://servername/server-status
    # Change ".example.com" to match your domain to enable.
    #
    #<Location /server-status>
    # SetHandler server-status
    # Order deny,allow
    # Deny from all
    # Allow from .your_domain.com
    #</Location>

    Uncomment the Location tags: remove the "#" characters in front of the lines that contain the location configuration from between "<Location /server-status>" to "</Location>", inclusive.

    This will make the server status accessible at location http://servername/server-status, access will be denied to everybody, but people connecting from the your_domain.com domain and any subdomain of your_domain.com.

  • Find and uncomment the following section of the httpd.conf file:

    # ExtendedStatus controls whether Apache will generate "full" status
    # information (ExtendedStatus On) or just basic information (ExtendedStatus
    # Off) when the "server-status" handler is called. The default is Off.
    #
    ExtendedStatus On

    This will make Apache generate additional information, like CPU use and requests per second.

  • Save the changes and close the httpd.conf file.

  • Restart the Apache server.

See Also

Monitoring Tested Application Performance - Basic Concepts
Adding Performance Counters
Counter Reference
Monitoring Tested Application Performance

Highlight search results