Forum Discussion

dhundley's avatar
dhundley
Regular Contributor
2 years ago

Configuring for and Adding performance counters

I have been tasked with looking into how to add the performance counters feature that are available in TestComplete. I began by following the steps on the SmartBear support webpage regarding this topic

https://support.smartbear.com/testcomplete/docs/testing-with/advanced/monitoring-performance/adding-counters.html#Computer

but when I got to step 4 and specified the computer IP in the Tested Host field I got the following error

 

and was ultimately instructed to make sure the remote machine was configured correctly by following the steps outlined on another SmartBear support webpage

https://support.smartbear.com/testcomplete/docs/testing-with/advanced/monitoring-performance/configuring.html

Below are the steps from this webpage that I’ve copied and pasted in. Below each step I’m pasting in (what I believe is) the confirmation that this step’s criteria has been met or (in two cases) I’m asking for help about how to verify that the information in a step is complete. Prior to performing these steps I did ensure that I could ping the remote machine from my workstation:

 

And I have created a Network Suite connection to this VM and can successfully verify its connection on the Hosts tab

 

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

  1. The monitored computer must belong to a Windows domain.

     

  2. The user account under which TestComplete is running must belong to one of the following user groups on the monitored computer:
    1. Administrators
    2. Performance Monitor Users
    3. Performance Log Users
      Note:     On Windows XP, the Performance Monitor Users and Performance Log Users groups are not available; use the Administrators group instead.

       

  3. TestComplete must be able to read the following registry keys on the monitored computer:
    1. HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Perflib

       

    2. 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.
      How do I check for this or has this been verified by the fact that this user account can get to this point of the registry and view these two keys?

Additional Requirements for Remote Computers

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

  1. If the TestComplete computer and the remote computer are in different domains, these domains must have a two-way trust relationship.
    How do I check for this?
  2. The following services must be enabled and running on the remote computer:
    1. File and Printer Sharing for Microsoft Networks

       

    2. Remote Registry
      Note:     The Remote Registry service is disabled by default on Windows Vista and later operating systems.

       

    3. Server

       

  3. TCP ports 139 and 445 must be allowed through the firewall on the remote computer.

     


     

  4. The following files must exist on the remote computer:
    1. <Windows>\System32\Perfc009.dat
    2. <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.

       




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

     

 

Thanks for your help!!!

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I have admin access to my vm, and I can access its counters by entering the tested hostname (it does take a while!)

    Running the automation, the results look like (not running anything on the vm)

     

    From my local machine, I've used Computer Management to ensure I can access Performance on the vm.

    Check to see if you have permissions to access Performance.

    • dhundley's avatar
      dhundley
      Regular Contributor

      from my local machine Computer Management it looks as though all i can access is performance for my local machine. Does that mean I'm SOL as far as using the performance counters in TestComplete?

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    If you right click Computer Management and select Connect to another computer...

    Once you've connected, if you can only see Performance and not Monitoring Tools, Data Collector Sets and Reports, then you don't have appropriate permissions.

    • dhundley's avatar
      dhundley
      Regular Contributor

      ok. got it. here's what mine looks like now

       

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Looks like your got permissions, great!

     

    Just managed to reproduce the same error,

    That's because I had restarted the vm. 

     

    After login into the vm, and restarting TestComplete. Connect to the machine,

    Once connected, I can then choose the counters,

     

    Log onto your remote machine, and restart TestComplete, are you then able to connect?

     

     

     

    • dhundley's avatar
      dhundley
      Regular Contributor

      ok. perhaps this is the root cause. on my remote machine i have testexecute set up to only start up when a test starts running on the remote (either via my CI tool or via Network Suite from my workstation). TestExecute is not running 24x7. are you saying that the testexecute on my remote machine (not testcomplete) has to be running in order for me to add the performance counters in the testcomplete in which i'm doing the development on my local workstation?  if so, then does testexecute have to remain running or can i go back to the "run only when needed" state after the counters have been added? 

       

      i'm going to go ahead and start up testexecute on the remote machine and see how that affects my being able to add counters in the testcomplete on my workstation. will let you know how that turns out

      • dhundley's avatar
        dhundley
        Regular Contributor

        even with testexecute up and running on the remote, i still get the same error on my testcomplete when i attempt to add a standard counter on that remote IP address

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I've logged into my vm, and no other applications are running.

     

    Using my local machine, I'm able to add the counters to TestComplete - I did have to restart TestComplete after receiving that error message. 

    • dhundley's avatar
      dhundley
      Regular Contributor

      i'm in the middle of something else right now but i will give that a try as soon as possible and let you know. thanks!

    • dhundley's avatar
      dhundley
      Regular Contributor

      nope. even after restarting the testcomplete on my workstation, i still get the same error when attempting to add a standard counter for the remote machine which now has testexecute running. 

    • dhundley's avatar
      dhundley
      Regular Contributor

      i opened that case first thing this morning. thanks again!