Skip to content

Custom Performance Counters

The PerformanceGuard agent is able to collect arbitrary Windows performance counters. Such counters are referred to as custom counters. You normally set them up with custom counter templates (ADMINISTRATION → Agent Configuration → Custom Counter Templates). See Custom Counters.

Collection of custom counters is controlled by lines in the configuration. The following syntax is supported:

CustomCounterNameLine = "CustomCounter." Id " = " NameDef
CustomCounterTiming = "CustomCounterTiming." Id " = " "<" SampleInterval ";" ReportInterval ">"
CustomCounterTimeFactor = "CustomCounterTimeFactor." Id " = " integer
Id = integer
NameDef = PerfObject "(" Instance ")\" Counter | PerfObject "\" Counter
PerfObject = CounterId
Instance = CounterId
Counter = CounterId
CounterId = CounterIdChar {CounterIdChar}
CounterIdChar = ? any printable character except backslash ?
SampleInterval = integer
ReportInterval = integer

If a counter has no CustomCounterTiming line, the agent uses <5;30>. CustomCounterTimeFactor is only used by agents that communicate with an old server version.

CustomCounter.1 = RAS Total\Bytes Received
CustomCounterTiming.1 = <5;30>
CustomCounter.2 = Search Indexer(_Total)\Index Size
CustomCounterTiming.2 = <10;30>

Sampling and reporting intervals for custom counters are specified in seconds per custom counter template.

Sampling interval controls how often a counter is sampled. A value of 1 means that the counter should be sampled every second.

Reporting interval controls how often agents should calculate min, max, sum and count. A value of 5 means that agents should calculate this every five seconds. The reporting interval thus has a direct impact on the amount of data from agents that PerformanceGuard needs to store and process.

Counter object names, and counter names are always in English, even on computers where localized names exist. PerformanceGuard will look up supplied object and counter names using the name index stored in:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009

In previous PerformanceGuard versions, the sampled values were the raw typeless numeric values. That meant that a counter such as the Datagrams/sec counter on IPv4 would collect the total number of datagrams sent since the IPv4 TCP stack was loaded, and not the rate of datagrams over time. In other words, the collected data would be an increasing monotonic sequence.

From PerformanceGuard 6.3, the sampled values are “cooked” values, resembling what you can typically view with Windows’ Performance Monitor. If we look at the Datagrams/sec counter example from before, you’ll now get the actual rate of datagrams over time.

Instance-aware counters are not available in the counter tool if they don’t have any associated instances.