Solaris System Management Agent Developer's Guide

About Long-Running Data Collection

SNMP is not ideally suited to collecting data that is generated over a period of time. Time-outs specified by an SNMP manager are generally only a few seconds, to enable most problems to be detected quickly. However, some data might be useful when looked at over a longer period, for example, to indicate a developing condition. Such data can only be collected through a long-running data collection to get around the timeout issue. You can code your module to perform long-running data collection. You can choose from several different design patterns to model such operations.

The following design patterns can be used to enable a module to handle long-running data collections through the agent.

SNMP alarm-based approach

The module registers an SNMP alarm to call a function at a specified interval. For most sites, this solution is most useful for performing long-running data collections. See SNMP Alarm Method for Data Collection for more information and code examples.

SNMP manager polling

The SNMP manager polls a status variable to find out whether a data collection is complete, and to determine the age of the data. The data is retrieved when the status variable returns an acceptable value. The polling approach is most useful if your site has one SNMP manager and several SNMP agents. See SNMP Manager Polling Method for Data Collection for more information and code examples.