NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Setting Up the Performance Counter Service

The PerformanceCounterService is a Windows service that maintains the current values of your counters in memory. You do not have to install and run PerformanceCounterService for your counters to run correctly, but unless you do (or run Performance Monitor) the values of your counters are reset to zero each time the last component to reference a counter is disposed of.

The PerformanceCounterService file is copied to your machine automatically during installation and can be found in your Bin\i386 directory.

To install PerformanceCounterService

  1. From the Windows command prompt, access the directory in which the performance counter service was copied.
  2. Type InstallUtil.exe PerformanceCounterService.exe.
  3. Open the Services dialog box by doing one of the following:
    • In Windows NT version 4.0, click Start, point to Settings, click Control Panel, and then click the Services icon.

      – or –

    • In Windows 2000 Server, click Start, point to Programs, click Administrative Tools, and then click Services.
  4. Right-click PerformanceCounterService in the list of services, and then click Properties.
  5. Right-click PerfCounterService in the list, and then click Start.

    You can now run your custom performance counter.

To uninstall PerformanceCounterService

  1. From the Windows command prompt, access the directory in which you installed the PerformanceCounterService executable file.
  2. Type InstallUtil.exe –u PerformanceCounterService.exe.

See Also

Performance Counter Lifetime