Monitor Sampling Functions

The monitor sampling functions are high-level functions called by the gateway. These functions internally record simple snapshot statistics and call the Folder Snapshot Functions and the Jump Window Functions to calculate the additional statistics. The monitor maintains a separate thread function, SharedMemoryUpdate, to periodically update the memory-mapped file with the calculated statistics.

The sample gateway uses monitor sample functions to make calls to MONITOR.LIB, which in turn uses the folder snapshot functions and the jump window functions in STATS.LIB. At regular intervals the SharedMemoryUpdate function copies the calculated statistics to the memory-mapped file.

The monitor sampling functions are listed in the following table.

Function Action When called
HrMonInit Initializes the data collection for all statistics of a folder. As gateway starts.
HrMonCollectNDRStats Builds statistics on the number of nondelivery reports produced in a folder. For each nondelivery report sent or received.
HrMonCollectMessage
XferStats
Builds statistics on the number of messages traveling in each direction through the gateway. For each message transferred through the gateway.
HrMonCollect
AssociationStats
Updates the statistic on the current number of gateway associations. Each time the number of associations changes.
HrMonLockCounters Locks the counters against access by other threads or processes. Before accessing a user-defined counter.
HrMonUnlock
Counters
Unlocks the counters to allow access by other threads or processes. After accessing a user-defined counter.
HrMonUninit Closes down the data collection for all statistics. As gateway stops.