Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI Interface for Performance Monitor

Learn how the PI Interface for Performance Monitor works

Learn how the PI Interface for Performance Monitor works

  • Last UpdatedJan 22, 2025
  • 3 minute read

To monitor performance, the interface reads Microsoft Windows performance counter data from each machine being monitored at frequencies specified by the scan classes configured for the interface instance. After the performance data from a counter is received and calculated, the interface writes the data to the PI point that contains the corresponding performance counter path in its Extended Descriptor attribute.

The interface includes definitions for a set of digital states that are assigned to status tags to indicate whether the interface has encountered problems collecting performance data. The interface also logs such errors.

When the interface starts, it creates a worker thread pool that connects to local and remote machines and gathers performance data from them. The number of worker threads to be created is specified by the /TC command-line parameter. The default number of threads is 10, the minimum is 1 and the maximum is 99. This setting is critical for successful interface runtime behavior in cases when one or more remote machines goes offline. As a general rule, if the interface is configured to monitor 100 machines, and you anticipate that 10 of them might go offline at the same time, set the number of worker threads to 12, to allocate one for each offline machine plus two to dispatch the remaining 80 online devices.

After initialization, the interface connects to the target Data Archive and locates the PI points that have a PointSource attribute matching the PointSource parameter configured for the interface instance. After the interface finds all PI points with the matching PointSource, it tries to load them one by one, checking additional tag attributes as follows:

  • Scan is enabled

  • Location1 matches the interface instance ID

  • Location2 is 0 for data and status tags, 1 for latency tags

  • Location4 specifies a valid scan class

  • Data type is digital or numeric

  • Extended Descriptor contains a valid performance counter path for data and status tags or, for latency tags, [LATENCY:computer].

If a PI point passes all the above checks, the interface will then:

  1. Connect to the computers being monitored, retrieve performance counters configuration data from them, and initialize the loaded PI points.

  2. Put the request for performance data for a device in a worker thread, process returned data, and make it available for writing to the Data Archive.

  3. Try to reconnect to any unreachable remote machines.

  4. Check availability of performance data for each PI point and write data to the PI point value and status. The interface writes values directly to the Data Archive unless buffering is enabled for the interface, in which case data is buffered and written to the Data Archive by the buffering subsystem.

  5. Check for tags that are added, edited and deleted and revise the internal tag list accordingly.

  6. Remove any unused machines from the interface if all its points are removed or deactivated.

The interface exits when its service is stopped or, if run from a command prompt, when it is interrupted by a CTRL+C command.

By default, the interface registers for performance counters once during startup and only attempts to re-register if the connection to the target machine is lost. As a result, and because of the way that PI interfaces report their performance counters, the Performance Monitor interface cannot properly read performance counters supplied by other PI interfaces that are started or re-started after the Performance Monitors interface has started. . To avoid missing counters from monitored computers that are started after the start of the Performance Monitor Interface by configuring the Performance Monitor interface to run in extended mode. The Performance Monitor interface will then periodically un-register and re-register its performance counters, allowing it to pick up counters from newly started PI interfaces without restarting the Performance Monitor interface. To configure this feature, enable Reload Performance Data Providers every N seconds on the PI Performance Monitor page of the ICU:

  • Set the reload time to zero to force the interface to re-register every time the interface starts counters, or

  • Choose a number greater than zero to force it to re-register periodically.

Note the following limitations:

  • In defining performance points, you cannot mix addressing conventions when specifying the target computer. Use the same method (either IP address or host name) for all points that you configure to monitor the computer. Mixing addressing modes can cause the interface to stop collecting data.

  • Do not run two instances of the interface in extended mode on the same computer to monitor the same remote devices. In extended mode, the interface periodically closes and reopens connections to the remotely monitored device. If two instances are periodically reconnecting to the same computers, one instance might incorrectly report the target computers as being offline.

TitleResults for “How to create a CRG?”Also Available in