Verifying successful performance counter operation – Rockwell Automation FactoryTalk Historian SE 3.0 UniInt Interface User Guide User Manual

Page 40

Advertising
background image

Windows Performance Counters

34

where service_name is the interface executable name without the .exe extension and
ServiceID is a service identifier that can be specified with the –serviceid command-line
parameter when the service was installed. If the –serviceid command-line parameter is
omitted when the service was installed, then the service identifier is NULL.

The variables under the Performance key should look similar to:

Close:REG_SZ:PIPrfData_Close
Collect:REG_SZ:PIPrfData_Collect
First Counter:REG_DWORD:0x82c
First Help:REG_DWORD:0x82d
Last Counter:REG_DWORD:0x83c
Last Help:REG_DWORD:0x83d
Library:REG_SZ:D:\PIPC\bin\pictrdll.dll
Open:REG_SZ:PIPrfData_Open

General performance counter information is stored in the registry under

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
\CurrentVersion\Perflib

The variables under the Perflib key should look similar to:

Base Index:REG_DWORD:0x737
ExtCounterTextLevel:REG_DWORD:0x1
LastCounter:REG_DWORD:0x83c
LastHelp:REG_DWORD:0x83d
Version:REG_DWORD:0x10001

The total number of counters that have been installed can be determined from the
LastCounter variable under the Perflib key. In the examples above the LastCounter and
LastHelp variables under the Perflib and Performance keys are the same, which means that
the interface performance counters were the last counters to be installed.

Verifying Successful Performance Counter Operation

If performance counters are successfully activated, the following message with be written to
the pipc.log when the interface starts:

Counters Successfully Activated (counters supported only for
Windows services only)

Otherwise, an appropriate error message will be written. Note that no messages will be
written if the interface is started interactively because performance counters are supported
only for Windows services.

While the interface is running as a service, an entry similar to

<No Name>:REG_SZ:<service_name>+<ServiceID>_Counters

will appear under the registry key

HKEY_LOCAL_MACHINE\SOFTWARE\PISystem\PI\Counters\<service_name>+<S
erviceID>\

When the interface service is stopped, the <No Name> entry under the registry key is
removed. If the entry is not removed, this may indicate that the interface terminated abruptly
without a chance to perform cleanup operations.

Advertising