Forum Discussion

dhundley's avatar
dhundley
Frequent Contributor
3 years ago
Solved

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

dhundley_0-1676914158569.png

 

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:

dhundley_1-1676914158571.png

 

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

dhundley_2-1676914158572.png

 

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.
    dhundley_3-1676914158574.png

     

  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.
      dhundley_4-1676914158575.png

       

  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
      dhundley_5-1676914158578.png

       

    2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg
      dhundley_6-1676914158580.png

       


      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
      dhundley_7-1676914158581.png

       

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

       

    3. Server
      dhundley_9-1676914158584.png

       

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

     


    dhundley_11-1676914158588.png

     

  4. The following files must exist on the remote computer:
    1. <Windows>\System32\Perfc009.dat
    2. <Windows>\System32\Perfh009.dat
      dhundley_12-1676914158590.png

       


      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.
      dhundley_13-1676914158593.png

       


      dhundley_14-1676914158594.png

  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.
    dhundley_15-1676914158596.png

     

 

Thanks for your help!!!

12 Replies

  • rraghvani's avatar
    rraghvani
    Icon for Champion Level 3 rankChampion 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!)

    rraghvani_0-1676987177793.png

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

    rraghvani_1-1676987292709.png

     

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

    rraghvani_2-1676987406455.png

    Check to see if you have permissions to access Performance.

    • dhundley's avatar
      dhundley
      Frequent 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
    Icon for Champion Level 3 rankChampion Level 3

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

    rraghvani_0-1676990352767.png

    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
      Frequent Contributor

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

      dhundley_0-1676990784606.png

       

  • rraghvani's avatar
    rraghvani
    Icon for Champion Level 3 rankChampion Level 3

    Looks like your got permissions, great!

     

    Just managed to reproduce the same error,

    rraghvani_0-1676991214784.png

    That's because I had restarted the vm. 

     

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

    rraghvani_1-1676991514481.png

    Once connected, I can then choose the counters,

    rraghvani_2-1676991563875.png

     

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

     

     

     

    • dhundley's avatar
      dhundley
      Frequent 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
        Frequent 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
    Icon for Champion Level 3 rankChampion 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
      Frequent 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
      Frequent 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
      Frequent Contributor

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