Hello,

I correct the perl script to dump to a text file and everything works fine.

Thanks,
garyc

----- Original Message -----
From: "Gary Clark" <[EMAIL PROTECTED]>
To: "Gary Clark" <[EMAIL PROTECTED]>; "Dave Shield"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, September 10, 2004 3:36 PM
Subject: Re: Adding traps


> Hello,
>
> By turning on the debug trace on the trace:
>
> snmptrapd -f -D -Lf dummy
>
> I can capture all the dump.
>
> I could then view the trace and saw that indeed the token "traphandler"
did
> get registered and a call was being made to my
> handler. My perl script was handling the trap handler call incorrectly.
But
> of course.
>
> Thanks,
> Garyc
>
> ----- Original Message -----
> From: "Gary Clark" <[EMAIL PROTECTED]>
> To: "Dave Shield" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Friday, September 10, 2004 12:48 PM
> Subject: Re: Adding traps
>
>
> > Hello,
> >
> > The problem I'm seeing is that the snmptrapd.conf I dont think is being
> > accessed due to the script not being ran.
> >
> > The snmptrapd.conf: now contains the following which Dave recommended:
> >
> >            traphandle .1.3.6.1.6.3.1.1.5.1 /usr/bin/perl
> > /usr/local/share/snmp/cold.pl
> >
> > I then used the following "cold.pl" perl script:
> >
> > #!/usr/bin/perl -w
> >
> > print "At last the coldStart handler is alive!!\n";
> >
> > sub getline()
> > {
> >     while (<STDIN>)
> >      {
> >           my $line =$_;
> >           chomp ($line);
> >           print $line;
> >       }
> > }
> > sub main()
> > {
> >       getline();
> > }
> > main();
> >
> > Simple. It accepts lines from STDIN and prints them out. This looks ok?
> > So if I dont see any output line I dont think the configuration is being
> > accessed.
> > Can somebody enlighten me on this? Is it an environment issue, if so how
> can
> > I determine this?
> > The snmptrapd.conf is located in /usr/local/share/snmp.
> >
> > I'm running the trapd and it does receive the coldStart trap I just dont
> see
> > my script being ran.
> >
> > Cheers,
> > Garyc
> > ----- Original Message -----
> > From: "Dave Shield" <[EMAIL PROTECTED]>
> > To: "Gary Clark" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Friday, September 10, 2004 9:26 AM
> > Subject: Re: Adding traps
> >
> >
> > >
> > > > I can see the coldStart trap being received but my script is not
run.
> > > >
> > > > Within the snmptrapd.conf file I added the following line:
> > > >
> > > > traphandle .1.3.6.1.6.3.1.5.1 /usr/bin/perl
> > /usr/local/share/snmp/cold.pl
> > >
> > > Try
> > >   traphandle .1.3.6.1.6.3.1.1.5.1 /usr/bin/perl
> > /usr/local/share/snmp/cold.pl
> > >
> > >
> > > Dave
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> > Project Admins to receive an Apple iPod Mini FREE for your judgement on
> > who ports your project to Linux PPC the best. Sponsored by IBM.
> > Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
> > _______________________________________________
> > 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



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
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

Reply via email to