--> dts has joined #net-snmp
--> prav has joined #net-snmp
[2003/05/08 04:58:01] #net-snmp <prav> i have a problem with snmptrapd daemon
[2003/05/08 04:58:36] #net-snmp <rstory> what's the problem, and which version are you using?
[2003/05/08 04:59:44] #net-snmp <prav> ucd snmp4.2.3
[2003/05/08 05:00:18] #net-snmp <prav> i want to change the format of traps logged
[2003/05/08 05:01:06] #net-snmp <prav> not by using the -F but the default format
[2003/05/08 05:02:50] #net-snmp <prav> i tried changing< const char *trap1_std_str >
[2003/05/08 05:03:21] #net-snmp <prav> is it the way to do it? plz hlp
[2003/05/08 05:04:37] #net-snmp <rstory> yes, that should work.
[2003/05/08 05:04:56] #net-snmp <prav> but it is not
[2003/05/08 05:05:37] #net-snmp <rstory> did you also change trap2_std_str?
[2003/05/08 05:06:05] #net-snmp <prav> ya this is the bit of code --
[2003/05/08 05:06:51] #net-snmp <prav> const char *trap1_std_str = "%m %l %.2h:%.2j:%.2k %B [%b] (via %A [%a]): %N %W Trap (%q) Uptime: %#T %v\n",
[2003/05/08 05:07:14] #net-snmp <prav> *trap2_std_str = "%m %l %.2h:%.2j:%.2k %B [%b]: %v\n";
[2003/05/08 05:07:37] #net-snmp <rstory> and what happens after you compile/run?
[2003/05/08 05:08:10] #net-snmp <prav> the same old format output is comming again
[2003/05/08 05:10:17] #net-snmp <rstory> sounds like you aren't running the right version.. did you make install to install the new version?
[2003/05/08 05:11:32] #net-snmp <prav> no i just copied the binary(this is my first major endevour into an open source project
[2003/05/08 05:14:21] #net-snmp <rstory> did you try running it for the build directory? './snmptrapd -f'
[2003/05/08 05:16:13] #net-snmp <prav> sorry i am compiling it in one box and tranfering it to another which recieves the traps
[2003/05/08 05:16:56] #net-snmp <prav> from the router
[2003/05/08 05:19:52] #net-snmp <prav> so what needs to be done now? plz
[2003/05/08 05:20:43] #net-snmp <prav> actually i have done log rottation and it is working fine as a binary!
[2003/05/08 05:21:08] #net-snmp <rstory> still checking...
[2003/05/08 05:24:02] #net-snmp <rstory> ok, you need to change the string in the format_plain_trap function..
[2003/05/08 05:24:29] #net-snmp <prav> ok in which file
[2003/05/08 05:27:07] #net-snmp <prav> ok i will check into that
[2003/05/08 05:27:21] #net-snmp <rstory> actually, just change lines 465/466 of snmptrapd.c to be:
[2003/05/08 05:27:21] #net-snmp <rstory> trunc = !realloc_format_trap(&rbuf, &r_len, &o_len, 1,
[2003/05/08 05:27:21] #net-snmp <rstory> trap1_std_str, pdu);
[2003/05/08 05:28:43] #net-snmp <prav> ok before it was 1 ! what is the diff?
[2003/05/08 05:30:03] #net-snmp <rstory> it should have been :
[2003/05/08 05:30:03] #net-snmp <rstory> trunc = !realloc_format_plain_trap(&rbuf, &r_len, &o_len,
[2003/05/08 05:30:03] #net-snmp <rstory> 1, pdu, transport);
[2003/05/08 05:30:45] #net-snmp <rstory> so you should change it to call realloc_format_trap with the trap1_std_str
[2003/05/08 05:35:31] #net-snmp <prav> ie in the if part or else part
[2003/05/08 05:36:20] #net-snmp <rstory> there is only one call to format_plain_trap.. that is the one you want to change.
[2003/05/08 05:38:06] #net-snmp <prav> ie -> trunc = !realloc_format_plain_trap(&rbuf, &r_len, &o_len, 1, pdu);
[2003/05/08 05:38:26] #net-snmp <rstory> yes
[2003/05/08 05:45:52] #net-snmp <prav> ok thanks!i will check that out and get back to u! buddy u people r doing a great job! in time i hope i will be able to start contibuting
[2003/05/08 05:47:24] #net-snmp <prav> i wanted to know one more thing i had tweaked snmptrapd to change
[2003/05/08 05:48:09] #net-snmp <prav> the log file every hour when used with -o switch is there any existing option for that
[2003/05/08 05:49:51] #net-snmp <rstory> no, we don't do log rotations.. you can do that with cron and SIGHUP..
[2003/05/08 05:50:37] #net-snmp <prav> ok
[2003/05/08 05:50:58] #net-snmp <prav> bye for now
--> wes has joined #net-snmp
[2003/05/08 06:29:09] #net-snmp <wes> rstory: this is for you: http://sourceforge.net/tracker/index.php?func=detail&aid=724927&group_id=12694&atid=312694
--> miike has joined #net-snmp
[2003/05/08 11:18:23] #net-snmp <ua> clear
--> TrogL has joined #net-snmp
--> BillGatesOfBorg has joined #net-snmp
--> benr has joined #net-snmp
--> Brilldon has joined #net-snmp
--> rstory has joined #net-snmp