Re: Help with exec and pass
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 2005-10-12 at 18:21 +0200, Santanu Misra wrote: > This is my entry in snmpd.conf file; > only using one of this at a given time. > > > #pass .1.3.6.1.4.1.9999.1 /usr/bin/lmstat.pl > exec .1.3.6.1.4.1.9999.1 FLEXLM /usr/bin/lmstat.pl Please note that "pass" and "exec" are *NOT* direct equivalents. "exec" (and "sh") are used to report the output of an arbitrary command - which will typically know nothing about SNMP. "pass" is used to implement SNMP-style behaviour without needing to incorporate code into the agent proper. The pass-through script is expected to follow a particular API, as described in snmpd.conf(5) (see under "PASS-THROUGH CONTROL") The agent does *NOT* simply report back the output of a pass-through script "blind" - that's the role of the "exec" and "sh" directives. With "exec" and "sh", the agent moulds the MIB structure to match the output of the command. With "pass", the script must mould its output to the needs of the agent. Please note too that the exec OID .... style is being deprecated, and will be phased out at some time in the future. If you're using 5.2 or above, you may wish to investigate the replacement extend OID .... directive, which works in a similar way, but provides a much more flexible (and legal!) output format. Dave > ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users