Alex,
I have also tried that but snmptrapd still exits here is the output from
the -f switch....
The command I used:
/usr/local/sbin/snmptrapd -Lo -f -Dall -On -C -c
/usr/local/share/snmp/snmptrapd.conf
The output:
dumpx_recv: 02 01 03
dumpv_recv: Integer: 3 (0x03)
dumpx_recv: 43 04 05 BB 9D 4D
dumpv_recv: UInteger: 96181581 (0x5BB9D4D)
trace: snmp_pdu_parse(): snmp_api.c, 4219:
dumph_recv: VarBindList
trace: snmp_pdu_parse(): snmp_api.c, 4249:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 166:
dumph_recv: Name
dumpx_recv: 06 0A 2B 06 01 04 01 59 02 03 01 00
dumpv_recv: ObjID: .1.3.6.1.4.1.89.2.3.1.0
trace: snmp_pdu_parse(): snmp_api.c, 4258:
dumph_recv: Value
dumpx_recv: 04 40 49 6C 6C 65 67 61 6C 20 4C 6F 61 64 20 52
65 70 6F 72 74 20 72 65 63 65 69 76 65 64 20 66
72 6F 6D 20 75 6E 6B 6E 6F 77 6E 20 73 65 72 76
65 72 20 32 31 33 2E 20 36 32 2E 31 39 34 2E 20
38 30
dumpv_recv: String: Illegal Load Report received from unknown
server 213. 62.194. 80
trace: snmp_pdu_parse(): snmp_api.c, 4249:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 166:
dumph_recv: Name
dumpx_recv: 06 0A 2B 06 01 04 01 59 02 03 02 00
dumpv_recv: ObjID: .1.3.6.1.4.1.89.2.3.2.0
trace: snmp_pdu_parse(): snmp_api.c, 4258:
dumph_recv: Value
dumpx_recv: 02 01 02
dumpv_recv: Integer: 2 (0x02)
trace: snmp_input(): snmptrapd_handlers.c, 910:
snmptrapd: input: a4
trace: snmp_input(): snmptrapd_handlers.c, 968:
snmptrapd: Trap OID: .1.3.6.1.4.1.89.35.1.0.3
trace: print_handler(): snmptrapd_handlers.c, 548:
snmptrapd: print_handler
trace: print_handler(): snmptrapd_handlers.c, 591:
snmptrapd: v1 format
trace: sprint_realloc_by_type(): mib.c, 1971:
output: sprint_by_type, type 4
trace: sprint_realloc_by_type(): mib.c, 1971:
output: sprint_by_type, type 2
2004-10-26 13:34:33 172.24.3.50(via 172.24.3.50) TRAP, SNMP v1, community
public
.1.3.6.1.4.1.89.35.1 Enterprise Specific Trap (3) Uptime: 11 days,
3:10:15.81
.1.3.6.1.4.1.89.2.3.1.0 = STRING: "Illegal Load Report received
from unknown server 213. 62.194. 80" .1.3.6.1.4.1.89.2.3.2.0 = INTEGER:
2
trace: netsnmp_get_traphandler(): snmptrapd_handlers.c, 430:
snmptrapd: get_traphandler matched (807ccd8)
trace: command_handler(): snmptrapd_handlers.c, 774:
snmptrapd: command_handler
trace: command_handler(): snmptrapd_handlers.c, 775:
snmptrapd: token = '/root/traphandle'
trace: netsnmp_ds_set_boolean(): default_store.c, 191:
netsnmp_ds_set_boolean: Setting LIB:13 = 1/True
trace: command_handler(): snmptrapd_handlers.c, 803:
snmptrapd: execute format
trace: sprint_realloc_by_type(): mib.c, 1971:
output: sprint_by_type, type 4
trace: sprint_realloc_by_type(): mib.c, 1971:
output: sprint_by_type, type 2
If I dont specify any traphandler scripts or programs the snmptrapd doesnt
exit it keeps receiving traps but when I specify a traphandler the
snmptrapd will exit as soon as it encounters the trap of which I have a
traphandler specified. I hope this makes more sense. the main problem is I
could never run snmptrapd in the background in this state becaus e once it
receives a trapit bails. The strange part here is I see no errors in the
output. The last line before I get my root prompt back is output:
sprint_by_type, type 2.
-Steph
|---------+------------------------------>
| | Alex Burger |
| | <[EMAIL PROTECTED]|
| | eforge.net> |
| | |
| | 10/26/2004 01:29 PM|
| | |
|---------+------------------------------>
>------------------------------------------------------------------------------------------------------------------------|
|
|
| To: Stephanos Kotsakis/NY/WGM/[EMAIL PROTECTED]
|
| cc: [EMAIL PROTECTED]
|
| Subject: Re: snmptrapd traphandle problem please help
|
>------------------------------------------------------------------------------------------------------------------------|
[EMAIL PROTECTED] wrote:
> 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
>
<snip>
>
> 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
You didn't specify -f, so snmptrapd will fork to the background so you
will never see any output to STDOUT. Try this:
snmptrapd -f -Lo -On -C -c /usr/local/share/snmp/snmptrapd.conf
Alex
< 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 ([EMAIL PROTECTED]), and destroy the original message. Thank you
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users