>> >> pass .20.3.6.1.4.1.9.2.2.1.1.20 /usr/local/bstat/bstat
>>   snmpwalk <server IP> secret .20.3.6.1.4.1.9.2.2.1.1.20
>
> D'oh!
> I've only just spotted.
> That's not a valid OID.
>
> OIDs can *only* start with  .0   .1  or   .2
> An OID starting with .20 is bogus.

  Nothing changes if I change .20 to .2.

  snmpd -v -D -f startup excerpt:

trace: read_config(): read_config.c, 738:
read_config: /etc/snmp/snmpd.conf:473 examining: pass 
.2.3.6.1.2.1.31.1.1.1.18/usr/local/bstat/bstat
trace: run_config_handler(): read_config.c, 441:
read_config: Found a parser.  Calling it: pass / 
.2.3.6.1.2.1.31.1.1.1.18/usr/local/bstat/bstat
trace: netsnmp_register_handler(): agent_handler.c, 190:
handler::register: Registering pass (::old_api) at 
joint-iso-ccitt.3.6.1.2.1.31.1.1.1.18
trace: netsnmp_inject_handler_before(): agent_handler.c, 311:
handler:inject: injecting bulk_to_next before old_api
trace: netsnmp_register_mib(): agent_registry.c, 566:
register_mib: registering "pass" at joint-iso-ccitt.3.6.1.2.1.31.1.1.1.18
trace: netsnmp_subtree_find_first(): agent_registry.c, 156:
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 160:
subtree: found one for: ""
trace: snmp_call_callbacks(): callback.c, 180:
callback: START calling callbacks for maj=1 min=1
trace: snmp_call_callbacks(): callback.c, 200:
callback: END calling callbacks for maj=1 min=1 (0 called)

  As you see snmpd finds pass directive. Now packet arrives:

trace: snmp_call_callbacks(): callback.c, 200:
callback: END calling callbacks for maj=1 min=0 (1 called)
trace: netsnmp_handle_request(): snmp_agent.c, 2893:
results: request results (status = 0):
trace: netsnmp_handle_request(): snmp_agent.c, 2896:
results:        joint-iso-ccitt.3.6.1.2.1.31.1.1.1.18 = No Such Object 
available on this agent at this OID
trace: _snmp_build(): snmp_api.c, 2771:
snmp_send: Building SNMPv1 message...
trace: _snmp_build(): snmp_api.c, 2774:
dumph_send: PDU-RESPONSE
trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3126:
snmp_pdu_realloc_rbuild: starting
trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3141:
dumph_send:   VarBind
trace: snmp_realloc_rbuild_var_op(): snmp.c, 341:
dumph_send:     Value
dumpx_send:      05 00
dumpv_send:        NULL
trace: snmp_realloc_rbuild_var_op(): snmp.c, 442:
dumph_send:     Name
dumpx_send:      06 0A 53 06 01 02 01 1F 01 01 01 12
dumpv_send:        ObjID: joint-iso-ccitt.3.6.1.2.1.31.1.1.1.18
trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3209:
dumph_send: error index
dumpx_send:  02 01 01
dumpv_send:    Integer: 1 (0x01)
trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3222:
dumph_send: error status
dumpx_send:  02 01 02
dumpv_send:    Integer: 2 (0x02)
trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3235:
dumph_send: request_id
dumpx_send:  02 04 37 B6 E4 57
dumpv_send:    Integer: 934732887 (0x37B6E457)
trace: _snmp_build(): snmp_api.c, 2780:
dumph_send: Community String
dumpx_send:  04 06 62 75 62 6C 69 6B
dumpv_send:    String:  bublik
trace: _snmp_build(): snmp_api.c, 2796:
dumph_send: SNMP Version Number
dumpx_send:  02 01 00
dumpv_send:    Integer: 0 (0x00)
trace: _snmp_build(): snmp_api.c, 2814:
dumph_send: SNMPv1 Message
trace: netsnmp_udp_send(): snmpUDPDomain.c, 166:
netsnmp_udp: send 45 bytes from 0x552ad63573 to <IP address> on fd 10
trace: netsnmp_remove_and_free_agent_snmp_session(): snmp_agent.c, 1599:
snmp_agent: REMOVE session == 0x552ad61f30
trace: free_agent_snmp_session(): snmp_agent.c, 1210:
snmp_agent: agent_sesion 0x552ad61f30 released
trace: handle_snmp_packet(): snmp_agent.c, 1736:
snmp_agent: end of handle_snmp_packet, asp = 0x552ad61f30
trace: _sess_read(): snmp_api.c, 5212:
sess_read: not reading 7 (fdset 0x7fbfffe830 set 0)
trace: _sess_read(): snmp_api.c, 5212:
sess_read: not reading 4 (fdset 0x7fbfffe830 set 0)
trace: snmp_sess_select_info(): snmp_api.c, 5625:
sess_select: for all sessions: 10 7 4
trace: receive(): snmpd.c, 1119:
snmpd/select: select( numfds=11, ..., tvp=(nil))

  Mindaugas


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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