> >> In the .conf file, I have the following:
> >>    exec .1.3.6.1.4.1.2021.50 qmail-messages
> >>         /usr/local/bin/qmailmrtg7 m /var/log/qmail
 
>> The file is compiled C binary...

>> > What happens if you try
>> >   sh .1.3.6.1.4.1.2021.50 qmail-messages
>> >        /usr/local/bin/qmailmrtg7 m /var/log/qmail
>> > instead?
>> If I try sh, I get back a -1 for the 100.1 value instead of 1.

>I've tried crafting a trivial binary that gives the same output
>(144 twice, on two separate lines), and using the same config
>directive.  But I get the expected results:

>$ snmpwalk localhost .1.3.6.1.4.1.2021.50
>UCD-SNMP-MIB::ucdavis.50.1.1 = INTEGER: 1
>UCD-SNMP-MIB::ucdavis.50.2.1 = STRING: "qmail-messages"
>UCD-SNMP-MIB::ucdavis.50.3.1 = STRING: "/tmp/a.out m /var/log/qmail"
>UCD-SNMP-MIB::ucdavis.50.100.1 = INTEGER: 256
>UCD-SNMP-MIB::ucdavis.50.101.1 = STRING: "144"
>UCD-SNMP-MIB::ucdavis.50.101.2 = STRING: "144"
>UCD-SNMP-MIB::ucdavis.50.102.1 = INTEGER: 0
>UCD-SNMP-MIB::ucdavis.50.103.1 = ""

>It looks suspiciously as if your program just isn't getting
>invoked at all.   It doesn't rely on any environmental
>variables, or anything similar does it?  What happens if
>you invoke this via a cron job, or using "at" ?

It took me a while to get to this - it was a busy week.  However, putting the 
same line:
/usr/local/bin/qmailmrtg7 m /var/log/qmail 
and putting the output into a tmp file from a cron job worked just fine...

>Which version of Net-SNMP are you using?
>(I don't see how that would make a difference, but....)
Using the latest and greatest...  5.2.1


----------------------------------------------------------------------------
Email in a Flash! http://www.goowy.com



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
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

Reply via email to