This is a discussion on Re: exec problem within the SNMP Users forums, part of the Networking and Network Related category; hi all, and sorry for previous multiple post - my mail domain had changed, so I resubscribed with a new address ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
hi all,
and sorry for previous multiple post - my mail domain had changed, so I resubscribed with a new address and reposted, but the list admin accepted my previous messages as well. After testing the agent with the -D option, I have found that the problem is actually caused by the lack of caching. I have a script that queries both the exit status and the message string from the agent, and the script is executed in both cases (i.e., no caching takes place). Thus, there is a chance that the first execution could return a normal exit status and the second one an error string (or vice versa). Although the snmpd.conf man page mentions that the agent caches the return values of 'exec' script, it seems that with newer versions of the agent this caching is not working anymore. Is there a way to change that situation, e.g., with some special options for compiling the source? br, risto Risto Vaarandi wrote: > hi folks, > > I am experiencing a problem with the 'exec' directive in the snmpd.conf > file of the snmpd daemon. I have the following lines in the script that > is configured for 'exec': > > echo Process OK > exit 0 > ... > echo Process fault > exit 1 > > However, in many occasions the snmpd agent reports the "Process fault" > string, but 0 as the exit status of the script. I am experiencing this > problem on SuSe SLES9 platform - both with snmpd 5.1 agent that comes > with SLES9, and snmpd 5.2.1 agent that I have compiled from the source. > > I have been using the exec script described above for years on RedHat > and Solaris (both with snmpd 4* and 5.0.*), and have never experienced > anything like this. How can I overcome this problem? If the snmpd agent > is caching the exit values somewhere, is there a way to switch that > cache off? Right now I am considering a downgrade from 5.2.1 to 5.0.9 or > 5.0.8. > > br, > risto > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. Play to > win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > 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 > ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 _______________________________________________ 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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|