Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

help on handling trap message

614 views
Skip to first unread message

Kousalya Kasinathan (CW)

unread,
Feb 19, 2004, 9:02:28 AM2/19/04
to
This is a multi-part message in MIME format.

------_=_NextPart_001_01C3F68A.B7063846
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,=20

I've installed "net-snmp_5.0.9-SunOS_5.8_sun4u.tar". I tried to use =
"snmptrapd" command to handle traps coming from switch.=20
I got the following error. Please let me know how to solve this.=20

bash-2.03$ snmptrapd -f -P
2004-02-18 17:41:16 NET-SNMP version 5.0.9 Started.
couldn't open udp:162 -- errno 13 ("Permission denied")
bash-2.03$

bash-2.03$ pwd
/automation/usr/local/sbin

This is the system configuration:=20

bash-2.03$ uname -a
SunOS xue1330 5.8 Generic_108528-22 sun4u sparc SUNW,Ultra-60

Thanks
Kousalya


------_=_NextPart_001_01C3F68A.B7063846
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.6249.1">
<TITLE>help on handling trap message</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=3D2 FACE=3D"Arial">Hi, </FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I've installed =
&quot;net-snmp_5.0.9-SunOS_5.8_sun4u.tar&quot;. I tried to use =
&quot;snmptrapd&quot; command to handle traps coming from switch. =
</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I got the following error. Please let =
me know how to solve this. </FONT>
</P>

<P><FONT COLOR=3D"#FF0000" SIZE=3D2 FACE=3D"Arial">bash-2.03$ snmptrapd =
-f -P</FONT>

<BR><FONT COLOR=3D"#FF0000" SIZE=3D2 FACE=3D"Arial">2004-02-18 17:41:16 =
NET-SNMP version 5.0.9 Started.</FONT>

<BR><FONT COLOR=3D"#FF0000" SIZE=3D2 FACE=3D"Arial">couldn't open =
udp:162 -- errno 13 (&quot;Permission denied&quot;)</FONT>

<BR><FONT COLOR=3D"#FF0000" SIZE=3D2 FACE=3D"Arial">bash-2.03$</FONT>
</P>

<P><FONT COLOR=3D"#FF0000" SIZE=3D2 FACE=3D"Arial">bash-2.03$ pwd</FONT>

<BR><FONT COLOR=3D"#FF0000" SIZE=3D2 =
FACE=3D"Arial">/automation/usr/local/sbin</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">This is the system configuration: =
</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">bash-2.03$ uname -a</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">SunOS xue1330 5.8 Generic_108528-22 =
sun4u sparc SUNW,Ultra-60</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Kousalya</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C3F68A.B7063846--


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Harnois Anne-Sophie

unread,
Feb 19, 2004, 9:49:00 AM2/19/04
to
Try again as "root"?
Anne-Sophie.

-----Original Message-----
From: Kousalya Kasinathan (CW) [mailto:kkas...@Brocade.COM]
Sent: jeudi 19 f=E9vrier 2004 02:50
To: net-snm...@lists.sourceforge.net
Cc: Kousalya Kasinathan (CW)
Subject: help on handling trap message


Hi,=20
I've installed "net-snmp_5.0.9-SunOS_5.8_sun4u.tar". I tried to use

"snmptrapd" command to handle traps coming from switch.=20
I got the following error. Please let me know how to solve this.=20

bash-2.03$ snmptrapd -f -P=20
2004-02-18 17:41:16 NET-SNMP version 5.0.9 Started.=20
couldn't open udp:162 -- errno 13 ("Permission denied")=20
bash-2.03$=20
bash-2.03$ pwd=20
/automation/usr/local/sbin=20


This is the system configuration:=20

bash-2.03$ uname -a=20
SunOS xue1330 5.8 Generic_108528-22 sun4u sparc SUNW,Ultra-60=20
Thanks=20
Kousalya=20

Dave Shield

unread,
Feb 19, 2004, 10:10:46 AM2/19/04
to

> I've installed "net-snmp_5.0.9-SunOS_5.8_sun4u.tar". I tried to use
> "snmptrapd" command to handle traps coming from switch.
> I got the following error. Please let me know how to solve this.
>
> bash-2.03$ snmptrapd -f -P

> 2004-02-18 17:41:16 NET-SNMP version 5.0.9 Started.
> couldn't open udp:162 -- errno 13 ("Permission denied")

Are you running this as yourself, or as root?
Port 162 is a "privileged port",
so you need root access to listen on it.

Dave

PS: Please - no HTML mail. Thanks

Bruce Shaw

unread,
Feb 19, 2004, 10:44:00 AM2/19/04
to
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C3F6FB.41C54F60
Content-Type: text/plain;
charset="iso-8859-1"

For a full explanation on how to run net-snmp on Solaris, see

http://sourceforge.net/tracker/index.php?func=detail
<http://sourceforge.net/tracker/index.php?func=detail&aid=895240&group_id=12
694&atid=312694> &aid=895240&group_id=12694&atid=312694

Download README.solaris 2.1.5

Note, snmptrapd is not specifically discussed, but if your problem is that
Sun's SNMP trap daemon is running, the procedures mentioned in
the beginning sections will fix the problem.

-----Original Message-----
From: Kousalya Kasinathan (CW) [mailto:kkas...@brocade.com]
Sent: Wednesday, February 18, 2004 6:50 PM
To: net-snm...@lists.sourceforge.net
Cc: Kousalya Kasinathan (CW)
Subject: help on handling trap message

Hi,

I've installed "net-snmp_5.0.9-SunOS_5.8_sun4u.tar". I tried to use


"snmptrapd" command to handle traps coming from switch.

I got the following error. Please let me know how to solve this.

bash-2.03$ snmptrapd -f -P
2004-02-18 17:41:16 NET-SNMP version 5.0.9 Started.
couldn't open udp:162 -- errno 13 ("Permission denied")

bash-2.03$

bash-2.03$ pwd
/automation/usr/local/sbin

This is the system configuration:

bash-2.03$ uname -a

SunOS xue1330 5.8 Generic_108528-22 sun4u sparc SUNW,Ultra-60

Thanks
Kousalya


This communication is intended for the use of the recipient to which it is
addressed, and may contain confidential, personal and or privileged
information. Please contact us immediately if you are not the intended
recipient of this communication, and do not copy, distribute, or take action
relying on it. Any communication received in error, or subsequent reply,
should be deleted or destroyed.


------_=_NextPart_001_01C3F6FB.41C54F60


Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">

<TITLE>help on handling trap message</TITLE>

<META content=3D"MSHTML 5.50.4933.1800" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D738461615-19022004><FONT face=3DArial =
color=3D#0000ff size=3D2>For a=20
full explanation on how to run net-snmp on Solaris, =
see</FONT></SPAN></DIV>
<DIV><SPAN class=3D738461615-19022004><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D738461615-19022004><FONT face=3DArial =
color=3D#0000ff size=3D2><A=20
href=3D"http://sourceforge.net/tracker/index.php?func=3Ddetail&amp;aid=3D=
895240&amp;group_id=3D12694&amp;atid=3D312694">http://sourceforge.net/tr=
acker/index.php?func=3Ddetail&amp;aid=3D895240&amp;group_id=3D12694&amp;=
atid=3D312694</A></FONT></SPAN></DIV>
<DIV><SPAN class=3D738461615-19022004><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D738461615-19022004><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>Download README.solaris 2.1.5</FONT></SPAN></DIV>
<DIV><SPAN class=3D738461615-19022004><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D738461615-19022004><FONT face=3DArial =
color=3D#0000ff size=3D2>Note,=20
snmptrapd is not specifically discussed, but if your problem is that =
Sun's SNMP=20
trap daemon is running, the procedures mentioned in</FONT></SPAN></DIV>
<DIV><SPAN class=3D738461615-19022004><FONT face=3DArial =
color=3D#0000ff size=3D2>the=20
beginning sections&nbsp;will fix the problem.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> Kousalya =
Kasinathan (CW)=20
[mailto:kkas...@brocade.com]<BR><B>Sent:</B> Wednesday, February 18, =
2004=20
6:50 PM<BR><B>To:</B> =
net-snm...@lists.sourceforge.net<BR><B>Cc:</B>=20
Kousalya Kasinathan (CW)<BR><B>Subject:</B> help on handling trap=20
message<BR><BR></FONT></DIV><!-- Converted from text/rtf format -->
<P><FONT face=3DArial size=3D2>Hi, </FONT></P>
<P><FONT face=3DArial size=3D2>I've installed=20
"net-snmp_5.0.9-SunOS_5.8_sun4u.tar". I tried to use "snmptrapd" =
command to=20
handle traps coming from switch. </FONT></P>
<P><FONT face=3DArial size=3D2>I got the following error. Please let =
me know how=20


to solve this. </FONT></P>

<P><FONT face=3DArial color=3D#ff0000 size=3D2>bash-2.03$ snmptrapd =
-f -P</FONT>=20
<BR><FONT face=3DArial color=3D#ff0000 size=3D2>2004-02-18 17:41:16 =
NET-SNMP version=20
5.0.9 Started.</FONT> <BR><FONT face=3DArial color=3D#ff0000 =
size=3D2>couldn't open=20
udp:162 -- errno 13 ("Permission denied")</FONT> <BR><FONT =
face=3DArial=20
color=3D#ff0000 size=3D2>bash-2.03$</FONT> </P>
<P><FONT face=3DArial color=3D#ff0000 size=3D2>bash-2.03$ pwd</FONT> =
<BR><FONT=20
face=3DArial color=3D#ff0000 =
size=3D2>/automation/usr/local/sbin</FONT> </P>
<P><FONT face=3DArial size=3D2>This is the system configuration: =
</FONT></P>
<P><FONT face=3DArial size=3D2>bash-2.03$ uname -a</FONT> <BR><FONT =
face=3DArial=20
size=3D2>SunOS xue1330 5.8 Generic_108528-22 sun4u sparc =
SUNW,Ultra-60</FONT>=20
</P>
<P><FONT face=3DArial size=3D2>Thanks</FONT> <BR><FONT face=3DArial=20
size=3D2>Kousalya</FONT> </P></BLOCKQUOTE></BODY></HTML>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">This communication is intended for the =
use of the recipient to which it is addressed, and may contain =
confidential, personal and or privileged information. Please contact us =
immediately if you are not the intended recipient of this =
communication, and do not copy, distribute, or take action relying on =
it. Any communication received in error, or subsequent reply, should be =
deleted or destroyed.</FONT></P>
<BR>

------_=_NextPart_001_01C3F6FB.41C54F60--

Dave Shield

unread,
Feb 20, 2004, 5:20:38 AM2/20/04
to
> I would like to capture trap messages and pass it to a
> procedure (function) which parses the trap message. How to do this?

This is probably easiest if you use the 5.1 (or 5.1.1) version of
the trap handler. We've re-structured the internals to make this
sort of this much more straightforward.

You'll still need to tweak the code to include your function,
and tell the trap handler (when) to call it. This can't be
done from the config file. But the basic operation should
be much cleaner.

> I tried to use "traphandle" command. But I don't find such command at a=
ll.
> I found one, but the file type is commands text. So i'm wondering wher=
e
> can I find traphandle command in net-snmp.

It's not a command. It's a config directive within the 'snmptrapd.conf'=

file. You specify the command that you want to be run.
For example:

traphandle linkUp /usr/local/bin/handle_links
traphandle linkUp /usr/local/bin/handle_links
traphandle ROYAL-MAIL::fragile /usr/local/bin/handle_with_care
traphandle default /usr/local/bin/handle_the_rest


You'd need to write the commands 'handle_links', 'handle_with_care'
and 'handle_the_rest' (which could be shell scripts, tcl scripts,
C programs or whatever you like)
The 'snmptrapd' command would take care of invoking them appropriately

Dave

Kousalya Kasinathan (CW)

unread,
Feb 20, 2004, 6:49:43 AM2/20/04
to
Hi,=20

Thanks for all ur replies. I'm able to do it as root. I've one more
question. I would like to capture trap messages and pass it to a
procedure (function) which parses the trap message. How to do this? I
tried to use "traphandle" command. But I don't find such command at all.
I found one, but the file type is commands text. So i'm wondering where
can I find traphandle command in net-snmp.=20

Is anybody using net-snmp with tcl? If so can you plese let me know how
r u handling trap messages.=20

bash-2.03$ pwd
/automation/usr/local/share/snmp/snmpconf-data/snmptrapd-data
bash-2.03$ type traphandle
traphandle is hashed (./traphandle)
bash-2.03$ ls
formatting snmpconf-config traphandle
bash-2.03$ type traphandle
traphandle is hashed (./traphandle)
bash-2.03$ file traphandle
traphandle: commands text


Thanks
Kousalya


-----Original Message-----
From: Dave Shield [mailto:D.T.S...@csc.liv.ac.uk]
Sent: Thursday, February 19, 2004 6:43 AM
To: Kousalya Kasinathan (CW)
Cc: net-snm...@lists.sourceforge.net
Subject: Re: help on handling trap message

> I've installed "net-snmp_5.0.9-SunOS_5.8_sun4u.tar". I tried to use
> "snmptrapd" command to handle traps coming from switch.
> I got the following error. Please let me know how to solve this.

>=20


> bash-2.03$ snmptrapd -f -P
> 2004-02-18 17:41:16 NET-SNMP version 5.0.9 Started.
> couldn't open udp:162 -- errno 13 ("Permission denied")

Are you running this as yourself, or as root?


Port 162 is a "privileged port",
so you need root access to listen on it.

Dave

PS: Please - no HTML mail. Thanks

0 new messages