Most UniInt-based interfaces have built-in ways of monitoring interface performance. Most of these require PI Points to be configured. However, performance summary log messages are written to the interface log file by default.
For interfaces that run on Windows, all of the performance statistics for an interface can be collected via Windows Performance Counters. That is, there are Windows performance counters that correspond to the performance summary log messages, I/O Rate Points, and Performance Points for Scan Classes. There are also additional Windows Performance Counters that extend the number of interface statistics beyond that which can be gathered on non-Windows platforms.
5.3 - Basic Interface Node Configuration
Windows Performance Counters
Many UniInt based interfaces now support Windows Performance Counters. Without any PI Point configuration, the counters for the interface can be viewed from the Windows Control panel under Administrative Tools > Performance. The one restriction is that the interface must be running as a service in order for the counter to be visible. The following diagram shows how the counters may appear for the PI Random Interface on the PI Server node.
In order to save the Windows Performance Counter data to PI, you must configure the PI Performance Monitor Interface, which is available as basic or full versions. The basic version is installed on the PI Server Node by default. You can collect performance counter data with the interface from local and remote interface nodes. For more information, see the PI
Performance Monitor Interface documentation.
The following performance counters are available for most UniInt-based interfaces that run as a service.
Counter Name Description Interface up-time
(seconds)
The number of seconds since the interface has started. This counter is incremented once a second.
IO Rate
(events/second) The number of events per second received by the interface. If this counter is viewed from the NT performance monitor, one should increase the update time of the performance monitor to the minimum scan period for the interface. For example, say that the minimum scanning period for the interface is 5 seconds (/f=5). One can set the
Counter Name Description
update rate of the performance monitor to 5 seconds by selecting the “Chart…” command from the Options menu. In the dialog box, change the periodic update time to 5 seconds. If the update time is left at 1 second, then the IO Rate will appear to go to zero between scans because no events are received between scans.
Point Count Number of points loaded by the interface. Scan Time
(milliseconds)
Time in milliseconds to call developer function and to write values to PI. There is one “Scan Time” counter per scan class.
Scheduled Scans: % Missed
Percentage of missed scans since starting the interface. If a scan occurs more than 1 second after its scheduled time, the scan is considered missed. There is one “Missed Scans” counter per scan class.
Related counters:
Scheduled Scans: % Skipped Scheduled Scans: Scans this interval Scheduled Scans,
% Skipped
Percentage of skipped scans since starting the interface. If a scan occurs 1 scan period or more after its scheduled time, then 1 or more scans are considered skipped. There is one “Skipped Scans” counter per scan class.
Related counters:
Scheduled Scans, % Missed
Scheduled Scans, Scans this interval Scheduled Scans:
Scans this interval
The total number of scans in the current performance interval. This total is the current sample size that is used to evaluate the % Missed Scans and the % Skipped scans. The performance interval is 8 hours by default, but this can be changed by the /perf command-line argument. The minimum performance interval is 60 seconds (see the /perf argument for more information). When the performance interval is exceeded, the previous samples are discarded and the sampling starts again from scratch.
Related counters:
Scheduled Scans, % Skipped Scheduled Scans, % Missed
Log file message count Number of messages that have been written to the log file. Only applies to the instance _Total.
Points edited in the
interface Number of point edits that have occurred. Only applies to the instance _Total. Points added to the
interface Number of point that have been added to the interface. Only applies to the instance _Total Points removed from
the interface
Number of point that have been removed from the interface. Only applies to the instance _Total
5.3 - Basic Interface Node Configuration
Performance Summary Log Messages
If the performance of a UniInt-based interface falls below a particular level, the interface will periodically write a performance summary to the interface log file. For each scan class, the summary shows the percentage of scans hit, the percent of scans missed, and the percent of scans skipped.
Scans that occur on time are considered hit. If a scan occurs more than 1 second after its scheduled time, the scan is considered missed. If a scan occurs 1 scan period or more after its scheduled time, then 1 or more scans are considered skipped. Say that a particular scan class has a period of 2 seconds. If a scan for this class occurs 1.1 seconds after its scheduled time, then 1 scan has been missed. However, no scans have been skipped because the next scan still has the opportunity to occur at its scheduled time, which happens to be 0.9 seconds after the last scan in this case. For scans that have periods of 1 second or less, the above definition of a missed scan does not make sense. In these cases, scans are considered either hit or skipped. Since every skipped scan is also considered to be a missed scan, the scan performance summary should indicate the same percentage of skipped and missed scans for scan classes with periods of 1 second or less.
The performance summary is logged every 8 hours if the hit ratio (hit ratio = hits / (hits + misses)) drops below 0.95. The frequency at which performance summaries are printed out can be adjusted using the /perf command line argument.
Configure I/O Rate Points
I/O Rate Points are PI Points that record 10-minute averages of the number of events per minute sent to the PI Server. Note that data collected by the I/O Rate Point is the same as the data that can be collected from the I/O Rate counter with the PI Performance Monitor Interface, except that the rate reported by the PI Performance Monitor Interface has units of events per second and the period over which the rate is averaged depends upon the scan rate of the Performance Monitor Interface. For example, the average will be taken over 10 minutes for a 10 minute scan class.
The I/O Rate Point, however, has the advantage that it can be configured for interfaces on UNIX and VMS as well as Windows. Note that VMS and UNIX nodes use a separate iorate program to maintain a list of rate tags. Windows nodes do the calculation within the interface program. Thus, only one program can increment a Windows event counter.
Use the following procedure to create an I/O Rate Point. On Windows, the following is can be done automatically from the PI Interface Configuration Utility.
Create a PI Point with the following attributes: PointSource = L; PointType = Float32; Zero = 0; Span = 3000 (typically, but greater as needed); EngUnits = Events/Min.
In the script file that starts the interface, use the /ec switch to assign an event counter between 1-34 or 51-100. This counter must be unique within iorates.dat (below). For example, to assign an event counter of 5, use this
line:....\interfaces\myint\myint /pa=X /ec=5 /id=1....
Locate the iorates.dat file or, if it does not exist, create it.
On VMS the iorates.dat file is located in the PISYSDAT directory.
Create an entry in iorates.dat to associate the event counter number with the tag. For example, sychip01,5 would associate event counter '5' with a tag called sychip01.
Performance Points for Scan Classes
Performance Points for Scan Classes are PI Points that record the total number of seconds required for an interface scan data from a device and subsequently send the data to the PI Server. This number is updated after data is sent to the PI Server at the completion of each scan. The closer the scan time is to 0 seconds, the better the performance. The data has engineering units of seconds and is recorded to millisecond resolution if a PointType of type float16, float32, or float 64 is used for the Performance Point. Performance can be configured for interfaces on UNIX and VMS as well as Windows.
The Windows Performance Counter that corresponds to a Performance Point is the “Scan Time” counter. Data that is collected from the “Scan Time” counter from the PI Performance Monitor Interface will have units of milliseconds.
Performance points are an important tool for tuning scan classes, because if a scan takes too long, it can cause the next scan to be skipped, resulting in data loss. The scan classes may be tuned by changing the scan frequency, the scan offset, and the number of tags in the scan list. For more information on configuring scan classes and scan lists, consult the interface-specific documentation.
Performance points are configured as follows. Set the extended descriptor (exdesc) to:
PERFORMANCE_POINT
or to:
PERFORMANCE_POINT=interface_id
where interface_id corresponds to the identifier that is specified with the /id flag on the startup command line of the interface. The character string PERFORMANCE_POINT is case insenstive. The interface_id does not need to be specified if there is only one copy of an interface that is associated with a particular point source.
Set Location4 to correspond to the scan class whose performance is to be monitored. For example, to monitor scan class 2, set Location4 to 2. See the /f flag for a description of scan classes.
Set the PointSource attribute to correspond to the /ps flag on the startup command line of the interface.
Set the PointType attribute to any of the floating-point point types that are supported by the PI Server.