You may come across some issues while collecting counters using Load Test. These 2 types of issues are most common:

1) Not able to access performance counter category on a computer

You’ll get this kind of error message in this scenario:

The performance counter category 'Network Interface' cannot be accessed on computer 'ComputerName' (Access is denied) ; check that the category and computer names are correct.

2) Timed Out while reading a performance counter category

You’ll get this kind of error message in this scenario:

The performance counter category ‘Memory’ cannot be accessed on computer ‘'ComputerName' (Timed out trying to read performance counter category ‘Memory’ on computer ‘'ComputerName' ); check that the category and computer names are correct.

There are  are multiple reasons which can cause issues mentioned above / other issues during counter collection. In this blog post, we’ll discuss what causes these issues and how to resolve them.

These are the main reasons which creates problems in collecting counters:

  1. Firewall Issue: Performance Logs & Alerts should be in allowed program list in firewall on a box from which you want to collect counter.
  2. Permissions issue: User account with which controller is running should be member of  Performance Log Users, Performance Monitor Users, or Administrators group on box from where you want to collect counters.
  3. Service Issue: 
    • Performance Logs & Alerts service should be running on box from where you want to collect counter.
    • Remote Registry service should be enabled and running on box from where you want to collect counter.
  4. Timeout Issue: Timeout may happen if you are collecting counters from remote / slow box e.g. remote web server. We can increase the timeout by adding this key in controller config file Controller.exe.config:

<appSettings>
<add key="LoadTestCounterCategoryReadTimeout" value="60000"/>
<add key="LoadTestCounterCategoryExistsTimeout" value="60000"/>
< /appSettings>

You’ll find Controller.exe.config inside %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE at your test controller box. In case you are not using test controller and doing a local run then please add above mentioned key in devenv.exe.config which you’ll find inside %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE at your client (VS Ultimate) box.

Above steps should solve your issue but in case it still persists then you can post it here