On Wed, 23 Feb 2005 16:20:26 -0300 Thomas wrote:
TMS> I installed net-snmp 5.1.1 which I downloaded from sunfreeware for Solaris
TMS> 9. The pass commandof the configuration file for the snmpd looks like
TMS> [...]
TMS>
TMS> If the script is called from the command line, it seems to work fine.
TMS> [...] If the script is called from the agent, the output looks like:
TMS> Reason: (noSuchName) There is no such variable name in this MIB.
The first thing to establish is if the script is actually being run. Add
something like this to the top of the script:
date >> /tmp/test
And make sure the file is written to when you try and get the object. You can
also add some debug by specifying -Ducd-snmp/pass as an argument to snmpd,
which will log the command it is running.
TMS> Just for a test I inserted the following 2 lines as the first commands at
TMS> the beginning of the script:
TMS> /usr/bin/echo "${2}\ninteger\n11"
TMS> exit 0
Hmm, if you did insert, and not replace with a different script, then that
would seem to indicate that the script is getting called. In that case, I'd add
some debug to the script at all the exit points, logging to a file what is
actually being returned to the agent.
TMS> I found some information about conflicting libraries and renamed the snmp
TMS> libraries in the /usr/lib directory.
You probably saw one of the many messages when I asked people to run the
command 'ls /usr/lib/*snmp*/ /usr/local/lib/*snmp*'. I was unaware that Solaris
had similarly named libraries. From now on, I'll have to be carefule to
use 'ls /usr/lib/*netsnmp*/ /usr/local/lib/*netsnmp*' to only search for
multiple versions of our libraries.
TMS> Does someone know about a timeout configuration or some other wrong
TMS> configuration? Is it a bug? The script worked already correctly with
TMS> netsnmp 5.0.7 under Solaris 9.
Unfortunately, there isn't any debug output from the guts of the pass code, so
if the steps I suggest above don't help, then you'll have to get into a
debugger or try a more recent release (like 5.2.1). If the problem persists,
then I'll have to send you patches to add more debug to try and see what the
problem is.
--
Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>
You are lost in a twisty maze of little standards, all different.
-------------------------------------------------------
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_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders