On 19/04/07, Charles Sprickman <[EMAIL PROTECTED]> wrote: > > You'd need to adjust the 'qm-stat-cat' script to return the numeric > > value as the *exit* status from the script, and then retrieve (and monitor) > > the OID UCD-SNMP-MIB::ucdavis.9100.1.100 > > I'm a little fuzzy on that... Are you saying that normally exec will > return a string if a script run via exec outputs anything to STDOUT, but > that if the script just exits with an exit code an integer type will be > returned?
No. I'm saying that UCD-SNMP-MIB::ucdavis.9100.1.101 will return the output of the script (as a string) and UCD-SNMP-MIB::ucdavis.9100.1.100 will return the exit code of the script (as an integer) This holds true regardless of what output the script produces. > So where possible I should use extend instead of exec basically? Yes. Or at least, you should certainly use extend {OID} {name} .... rather than exec {OID} {name} .... (The "exec {name} ..." form is OK) Note that the structure of the "extend" output is different, so you'd need to do a walk on the root OID first, to locate the actualy OIDs to monitor. But this new structure is much richer, as well as being legal! Dave ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users