>
>> From: net-snmp-users-bounces@lists.sourceforge.net
>> [mailto:net-snmp-users-bounces@lists.sourceforge.net] On
>> Behalf Of olivier@exxoss.com
>> Sent: Tuesday, March 25, 2008 5:21 AM

>
>> When I launch the selfmonitor.pl script by hand I can send
>> ping, get and
>> getnext commands, they all work well and return the expected results.
>> However, when the same script is called from netSNMP it answers to the
>> ping request but not to the get request.

>
> Please clarify - there is no "ping" in SNMP. What exactly are you doing.
>
>
> Thanks,
>
> Mike
>


I'm talking about the pass_persist mechanism implemented in netSNMP to
delegate request to a sub tree to an external script. That interface does
send a PING\n on the external script STDIN and expects PONG\n on the
script STDOUT.

Somehow my orginial message got removed from this e-mail so there's a copy
of it at the bottom of this e-mail.

Thanks

Olivier

Original message :

Hi,

I'm having trouble using the pass_persist functionality of net-snmp. I
have written a set of scripts that implement an snmp tree. the core
script called selfmonitor.pl is called via pass_persist from net-SNMP and
selfmonitor in turn calls other scripts to retrieve the information
requested by net-SNMP.

When I launch the selfmonitor.pl script by hand I can send ping, get and
getnext commands, they all work well and return the expected results.
However, when the same script is called from netSNMP it answers to the
ping request but not to the get request.

My script receives de get request, processes it and writes the output to
stdout. Net-snmp never receives the answers and then my script is unable
to read again on stdin and exists with an error.

I'm being very confused by the fact that it works when launched by hand
and also by the fact that stdin seem to get closed unexpectedly.

Is there any known bugs in that version of the NetSNMP / Perl / Solaris
trio ?

What are the difference in environment and tty that I should expect when
the script is launched trough Net-SNMP?

Any insight / experience / pointers about this kind of problems would be
greatly appreciated as I've been looking into this problem for about a
week and I'm now running out of ideas.

I use the following versions :

Net-SNMP : 5.0.7
Perl : 5.8.0
Solaris 9 : 5.9 sparc.



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216...et/marketplace
_______________________________________________
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/...net-snmp-users