Udostępnij za pośrednictwem


Reading Performance Counters on Vista and Server 2008 Machines

Users commonly experience problems collecting counters during a load test. These problems come in two flavors: 1) they are not able to collect any counters at all from a machine or machines, and 2) they see gaps in the counter collection. This article addresses the first problem.

If you are experiencing this problem, you'll see errors in the load test of the form:

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

The "gold standard" for understanding whether or not remote counter collection is enabled is to run perfmon.exe as the user who is collecting the counters. Simply logon as that user and run perfmon and add a counter from the machine you are collecting from. If you are running user a controller and agents, you must log on as the controller service user.

If you experience problems connecting to the computer, follow these steps.

In order to allow remote performance counter collection for a machine, you need to follow these steps on the machine you are collecting from. Note if you are using a test controller, the user account is the account the controller service is running as. If you are running load tests locally, the counters are collected using your user credentials.

  1. Run WF.msc 
    1. Enable the Performance Logs & Alerts firewall exception
    2. On Vista, enable the File and Printer Sharing firewall exception
  2. Run lusrmgr.msc
    1. Add the user to the Performance Log Users, Performance Monitor Users, or Administrators group.
    2. Add the user to the Event Log Readers group
  3. Run services.msc 
    1. Set the Performance Logs & Alerts service to autorun
    2. Set the Remote Registry service to autorun
  4. Run secpol.msc to assign the Log on as a Batch User privilege to Performance Log Users and Performance Monitor Users group:
    1. In Local Security Policy navigate to Local Policies -> User Right Assignment
    2. Double-click on "Log on as batch job"
    3. Add Performance Log Users group
    4. Add Performance Monitor Users group

Open a command prompt and rebuild all counters on the machine by running

lodctr /r

This Technet article goes through these various steps as well.

Here's a summary:

Vista/Server 2008

Able to view counters

Able to log counter data

Prompts a elevation to query counter data

Standard user

No

No

No

Admin

Yes

Yes

Yes

Performance Log Users

Yes

Yes

No

Performance Monitor Users Group

Yes

No

No

I believe the steps are the same for Server 2003, but need to confirm that.

Hope that helps,

Ed.

Comments

  • Anonymous
    November 18, 2008
    PingBack from http://mstechnews.info/2008/11/reading-performance-counters-on-vista-and-server-2008-machines/

  • Anonymous
    December 17, 2008
    This is a common question that I hear from customers in configuring load testing in their environments,

  • Anonymous
    March 05, 2009
    I’ve updated my Load Test Links post with links to new posts, as well as added some links to content

  • Anonymous
    December 07, 2010
    I followed the instructions below and after running the lodctr /r My commerce server started getting performance counter errors. I would recommend that you backup your perf counter stuff first by running lodctr /s before running it with the /r flag.

  • Anonymous
    May 07, 2012
    We have created 11 web test scenarios and added those to load test ,then triggered the load test. After completing the test successfully.we have started looking for all the requests response times in the Tables view.Unfortunately we are unable to see all the requests ,some requests are missing in the Request Tab in Tables View. Where as when we run the load test with 5 web test scenarios it is working fine. Is there any limitation on the number of requests displayed in the request tab of Tables View ? Please share your input ASAP.