s***@weil.com
2004-10-26 14:24:02 UTC
Hello,
I am having a problem I just can not figure out with snmptrapd. I simply
wrote traphandler script to echo Hello World out to the screen when a
certain trap is detected. To set this up I configured
/usr/local/share/snmp/snmptrapd.conf with the following lines
/usr/local/share/snmp/snmptrapd.conf
###########################################################################
#
# snmptrapd.conf
#
# - created by the snmpconf configuration program
#
###########################################################################
# SECTION: Trap Handlers
#
# Here we define what programs are run when a trap is
# received by the trap receiver.
# traphandle: When traps are received, a program can be run.
# When traps are received, the list of configured trap
# handles is consulted and any configured program is run.
# If no handler is found, any handler with "default" as the
# traphandle type is run instead. The information contained
# in trap is passed to the program via standard input (see
# the snmptrapd.conf manual page for details).
#
# arguments: oid|"default" program args
traphandle .1.3.6.1.4.1.89.35.1.0.3 /root/traphandle
The problem is when I run snmptrapd and the trap with stated OID is
generated snmptrapd just exits and I do not get any output from my
traphandler even though snmptrapd 1) receives the trap and 2) finds and
knows about the traphandler. I get the same result if I replace the
specific OID with the default directive.
Here is the command Im using:
/usr/local/sbin/snmptrapd -Lo -Dall -On -C -c
/usr/local/share/snmp/snmptrapd.conf
And here is most of the output of this command..
....
parse-mibs: Parsing MIB: 6 SNMPv2-TM
trace: read_module_internal(): parse.c, 3728:
parse-mibs: Module SNMPv2-SMI already loaded
trace: parse_imports(): parse.c, 3549:
parse-mibs: #### adding Module 6 'snmpModules' 4
trace: parse_imports(): parse.c, 3549:
parse-mibs: #### adding Module 6 'snmpDomains' 4
trace: parse_imports(): parse.c, 3549:
parse-mibs: #### adding Module 6 'snmpProxys' 4
trace: do_linkup(): parse.c, 1662:
parse-mibs: Processing IMPORTS for module 6 SNMPv2-TM
trace: do_linkup(): parse.c, 1675:
parse-mibs: Processing import: snmpModules
trace: do_linkup(): parse.c, 1675:
parse-mibs: Processing import: snmpDomains
trace: do_linkup(): parse.c, 1675:
parse-mibs: Processing import: snmpProxys
trace: parse(): parse.c, 4346:
parse-file: End of file (/usr/local/share/snmp/mibs/SNMPv2-TM.txt)
trace: init_mib(): mib.c, 2638:
init_mib: Seen PREFIX: Looking in '.1.3.6.1.2.1' for prefix ...
trace: read_configs(): read_config.c, 771:
read_config: reading normal configuration tokens
trace: read_configs(): read_config.c, 795:
read_config: Reading optional config file:
"/usr/local/share/snmp/snmptrapd.conf"
trace: read_config(): read_config.c, 678:
read_config: Reading configuration /usr/local/share/snmp/snmptrapd.conf
trace: read_config(): read_config.c, 738:
read_config: /usr/local/share/snmp/snmptrapd.conf:26 examining: traphandle
.1.3.6.1.4.1.89.35.1.0.3 /root/traphandle
trace: run_config_handler(): read_config.c, 441:
read_config: Found a parser. Calling it: traphandle /
.1.3.6.1.4.1.89.35.1.0.3 /root/traphandle
trace: snmptrapd_parse_traphandle(): snmptrapd_handlers.c, 82:
read_config:traphandle: registering handler for: .1.3.6.1.4.1.89.35.1.0.3
trace: netsnmp_ds_set_boolean(): default_store.c, 191:
netsnmp_ds_set_boolean: Setting LIB:27 = 1/True
trace: snmp_call_callbacks(): callback.c, 176:
callback: START calling callbacks for maj=0 min=0
trace: snmp_call_callbacks(): callback.c, 184:
callback: calling a callback for maj=0 min=0
trace: snmp_call_callbacks(): callback.c, 184:
callback: calling a callback for maj=0 min=0
trace: sc_hash(): scapi.c, 386:
trace: sc_get_properlength(): scapi.c, 115:
trace: sc_hash(): scapi.c, 386:
trace: sc_get_properlength(): scapi.c, 115:
trace: set_enginetime(): lcd_time.c, 354:
lcd_set_enginetime: engineID 80 00 07 E5 80 50 53 E2 36 4B 77 7E 41 :
boots=1, time=0
trace: snmp_call_callbacks(): callback.c, 184:
callback: calling a callback for maj=0 min=0
trace: set_an_alarm(): snmp_alarm.c, 363:
snmp_alarm: no alarms found to schedule
trace: snmp_call_callbacks(): callback.c, 196:
callback: END calling callbacks for maj=0 min=0 (3 called)
I was using net-snmp 5.1.1 but then prayed and hoped that if I compiled and
installed 5.1.2 the problem would go away, so now I am using net-snmp 5.1.2
and still having this problem. The machine is running SuSE 8.1 linux kernel
2.4.19 with a gcc version of 3.2.
I also tried compiling a C program that outputs Hello World to stdout and
used that instead of a script with the same result.
Any help is appreciated, I am out of ideas here....
Thanks
Steph
< END >
-----------------------------------------
The information contained in this email message is intended only for use of
the individual or entity named above. If the reader of this message is not
the intended recipient, or the employee or agent responsible to deliver it
to the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If
you have received this communication in error, please immediately notify us
by email (***@weil.com), and destroy the original message. Thank you
I am having a problem I just can not figure out with snmptrapd. I simply
wrote traphandler script to echo Hello World out to the screen when a
certain trap is detected. To set this up I configured
/usr/local/share/snmp/snmptrapd.conf with the following lines
/usr/local/share/snmp/snmptrapd.conf
###########################################################################
#
# snmptrapd.conf
#
# - created by the snmpconf configuration program
#
###########################################################################
# SECTION: Trap Handlers
#
# Here we define what programs are run when a trap is
# received by the trap receiver.
# traphandle: When traps are received, a program can be run.
# When traps are received, the list of configured trap
# handles is consulted and any configured program is run.
# If no handler is found, any handler with "default" as the
# traphandle type is run instead. The information contained
# in trap is passed to the program via standard input (see
# the snmptrapd.conf manual page for details).
#
# arguments: oid|"default" program args
traphandle .1.3.6.1.4.1.89.35.1.0.3 /root/traphandle
The problem is when I run snmptrapd and the trap with stated OID is
generated snmptrapd just exits and I do not get any output from my
traphandler even though snmptrapd 1) receives the trap and 2) finds and
knows about the traphandler. I get the same result if I replace the
specific OID with the default directive.
Here is the command Im using:
/usr/local/sbin/snmptrapd -Lo -Dall -On -C -c
/usr/local/share/snmp/snmptrapd.conf
And here is most of the output of this command..
....
parse-mibs: Parsing MIB: 6 SNMPv2-TM
trace: read_module_internal(): parse.c, 3728:
parse-mibs: Module SNMPv2-SMI already loaded
trace: parse_imports(): parse.c, 3549:
parse-mibs: #### adding Module 6 'snmpModules' 4
trace: parse_imports(): parse.c, 3549:
parse-mibs: #### adding Module 6 'snmpDomains' 4
trace: parse_imports(): parse.c, 3549:
parse-mibs: #### adding Module 6 'snmpProxys' 4
trace: do_linkup(): parse.c, 1662:
parse-mibs: Processing IMPORTS for module 6 SNMPv2-TM
trace: do_linkup(): parse.c, 1675:
parse-mibs: Processing import: snmpModules
trace: do_linkup(): parse.c, 1675:
parse-mibs: Processing import: snmpDomains
trace: do_linkup(): parse.c, 1675:
parse-mibs: Processing import: snmpProxys
trace: parse(): parse.c, 4346:
parse-file: End of file (/usr/local/share/snmp/mibs/SNMPv2-TM.txt)
trace: init_mib(): mib.c, 2638:
init_mib: Seen PREFIX: Looking in '.1.3.6.1.2.1' for prefix ...
trace: read_configs(): read_config.c, 771:
read_config: reading normal configuration tokens
trace: read_configs(): read_config.c, 795:
read_config: Reading optional config file:
"/usr/local/share/snmp/snmptrapd.conf"
trace: read_config(): read_config.c, 678:
read_config: Reading configuration /usr/local/share/snmp/snmptrapd.conf
trace: read_config(): read_config.c, 738:
read_config: /usr/local/share/snmp/snmptrapd.conf:26 examining: traphandle
.1.3.6.1.4.1.89.35.1.0.3 /root/traphandle
trace: run_config_handler(): read_config.c, 441:
read_config: Found a parser. Calling it: traphandle /
.1.3.6.1.4.1.89.35.1.0.3 /root/traphandle
trace: snmptrapd_parse_traphandle(): snmptrapd_handlers.c, 82:
read_config:traphandle: registering handler for: .1.3.6.1.4.1.89.35.1.0.3
trace: netsnmp_ds_set_boolean(): default_store.c, 191:
netsnmp_ds_set_boolean: Setting LIB:27 = 1/True
trace: snmp_call_callbacks(): callback.c, 176:
callback: START calling callbacks for maj=0 min=0
trace: snmp_call_callbacks(): callback.c, 184:
callback: calling a callback for maj=0 min=0
trace: snmp_call_callbacks(): callback.c, 184:
callback: calling a callback for maj=0 min=0
trace: sc_hash(): scapi.c, 386:
trace: sc_get_properlength(): scapi.c, 115:
trace: sc_hash(): scapi.c, 386:
trace: sc_get_properlength(): scapi.c, 115:
trace: set_enginetime(): lcd_time.c, 354:
lcd_set_enginetime: engineID 80 00 07 E5 80 50 53 E2 36 4B 77 7E 41 :
boots=1, time=0
trace: snmp_call_callbacks(): callback.c, 184:
callback: calling a callback for maj=0 min=0
trace: set_an_alarm(): snmp_alarm.c, 363:
snmp_alarm: no alarms found to schedule
trace: snmp_call_callbacks(): callback.c, 196:
callback: END calling callbacks for maj=0 min=0 (3 called)
I was using net-snmp 5.1.1 but then prayed and hoped that if I compiled and
installed 5.1.2 the problem would go away, so now I am using net-snmp 5.1.2
and still having this problem. The machine is running SuSE 8.1 linux kernel
2.4.19 with a gcc version of 3.2.
I also tried compiling a C program that outputs Hello World to stdout and
used that instead of a script with the same result.
Any help is appreciated, I am out of ideas here....
Thanks
Steph
< END >
-----------------------------------------
The information contained in this email message is intended only for use of
the individual or entity named above. If the reader of this message is not
the intended recipient, or the employee or agent responsible to deliver it
to the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If
you have received this communication in error, please immediately notify us
by email (***@weil.com), and destroy the original message. Thank you