2

I'm trying to build my own SNMP-agent (on Solaris 10.0) and added a line to my snmpd.conf:

pass .1.3.6.1.4.1.xxxx    /home/snmp/snmp_agent.bash

For testing, the only thing the bash-script does, is writing the current time and arguments to a log-file. Now, when I use net-snmp to perform a SET-request, by:

 snmpset -v1 -c public node 1.3.6.1.4.1.1590.xxxx.1 i 1

I notice two lines in the log-file. One with an argument -g (which means a GET), and the other with -s (which means a SET). Why do I get the one with -g and how can I get rid of it?

It's annoying me because in my MIB I have some OIDs with MAX-ACCESS = write-only, and the agent gives an error when trying to read this OID.

I looked on internet about this problem (or maybe it's not a problem), but couldn't find anything.

k1eran
  • 4,492
  • 8
  • 50
  • 73
Gijsbert
  • 31
  • 2

1 Answers1

0

I believe the internals of the Net-SNMP agent do this to pass scripts only. EG, it's a requirement of using the 'pass' extension and has nothing to do with what's happening "on the wire".

Wes Hardaker
  • 21,735
  • 2
  • 38
  • 69
  • Do you mean the "pass" option is responsible for splitting the SET-request into two separate script calls? It seems to happen this way indeed, but I don't understand the use of it. Is there a way to avoid this "feature"? Thanks! – Gijsbert Aug 17 '13 at 07:11