RE: Net-snmp-users Digest, Vol 5, Issue 13

<[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi All, 

We are trying to run our application whenever my snmptrapd daemon receive a trap. I had made changes in my snmptrapd.conf as 

traphandle “default” /usr/local/bin/test.out 

test.out will just open a text file and write a string in it. my snmptrap daemon is receiving the trap but my aplication doesn't get initialize (Run).

 I had also tried like traphandle default 

/usr/local/bin/test.out but then also it doesn't work. 

I am attaching my snmptrapd.conf file. Please give your valuable suggestions.

Thanks & Regards 
Jitendra sanghani
Project Engineer
Embedded Systems
Wipro Technologies
Pune,INDIA.
9890661660.

"The only difference between success and failure is success is when you get up, from your failure"



-----Original Message-----
From: [email protected] on behalf of [email protected]
Sent: Fri 10/6/2006 3:05 PM
To: [email protected]
Subject: Net-snmp-users Digest, Vol 5, Issue 13
 
Send Net-snmp-users mailing list submissions to
	[email protected]

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.sourceforge.net/lists/listinfo/net-snmp-users
or, via email, send a message with subject or body 'help' to
	[email protected]

You can reach the person managing the list at
	[email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Net-snmp-users digest..."


Today's Topics:

   1. Multiple row creation  ([email protected])
   2. Re: snmpd goes to 100% CPU (Thomas Anders)
   3. Re: SNMPD exists after error: "nlist: No such file or
      directory" (Thomas Anders)
   4. Re: Multiple row creation (Dave Shield)
   5. Re: Compiling Binaries for HP UX (Johannes Schmidt-Fischer)
   6. RE: Multiple row creation ([email protected])
   7. Re: Multiple row creation (Dave Shield)
   8. RE: Multiple row creation ([email protected])
   9. Discovering peer engineID while sending INFORMS (Enric Bel Prim)


----------------------------------------------------------------------

Message: 1
Date: Fri, 6 Oct 2006 09:55:12 +0530
From: <[email protected]>
Subject: Multiple row creation 
To: <[email protected]>
Message-ID:
	<[email protected]>
Content-Type: text/plain;	charset="us-ascii"

Hi ALL,

I have one doubt. Is it possible to create multiple rows in single
SNMPSET request?

Regards,
Somenath 



------------------------------

Message: 2
Date: Fri, 06 Oct 2006 08:49:03 +0200
From: Thomas Anders <[email protected]>
Subject: Re: snmpd goes to 100% CPU
To: Sauterel Fabrice <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Dave Shield wrote:
> On 04/10/06, Sauterel Fabrice <[email protected]> wrote:
>>> Which version of the agent are you working with?  What O/S?
>> I am running net-snmp-5.2.3 on IBM AIX5.3
> 
> It's probably worth trying with the most recent full release (5.3.1),
> or the latest pre-release code (currently 5.4.pre3).  I have a feeling
> there's been some work on AIX support recently, so these might well
> work better than the 5.2.x line.
>   It would be useful to know, anyway.

The problem still exists in 5.3.1 and 5.4.pre3. It's on the open issues list for
5.4, though, and will hopefully get fixed before the final release.


+Thomas

-- 
Thomas Anders (thomas.anders at blue-cable.de)



------------------------------

Message: 3
Date: Fri, 06 Oct 2006 08:51:17 +0200
From: Thomas Anders <[email protected]>
Subject: Re: SNMPD exists after error: "nlist: No such file or
	directory"
To: "Jain, Anshul" <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Jain, Anshul wrote:
> I am trying to run the version 5.3.1 of NET-SNMP on AIX 5.3.

This is a known problem. It will hopefully get fixed for the upcoming 5.4 release.


+Thomas

-- 
Thomas Anders (thomas.anders at blue-cable.de)



------------------------------

Message: 4
Date: Fri, 6 Oct 2006 09:40:38 +0100
From: "Dave Shield" <[email protected]>
Subject: Re: Multiple row creation
To: "[email protected]" <[email protected]>
Cc: [email protected]
Message-ID:
	<[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 06/10/06, [email protected] <[email protected]> wrote:
> Is it possible to create multiple rows in single SNMPSET request?

Yes

Dave



------------------------------

Message: 5
Date: Thu, 05 Oct 2006 19:22:57 +0200
From: Johannes Schmidt-Fischer <[email protected]>
Subject: Re: Compiling Binaries for HP UX
To: [email protected]
Cc: [email protected].
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Hello,

I'd suggest that you run configure with the option --prefix=dir where
dir is an empty directory like $HOME/inst-net-snmp on any of your HP-UX
servers with ANSI-C installed. After that you run make on that machine.

Finally you'll have all files that are to be installed on all of your
HP-UX servers in that directory. Save all those files with tar relative
from that directory. Afterwards you might unpack that tar file under
/usr/local at all other HP-UX machines.

Note that all those machines must be equivalent (same processor type,
same operating system version etc.).

It might be necessary to link all binaries statically since HP-UX looks
for the dynamic libraries in the directory they've been at link time
when starting any binary. Due to that installing under HP-UX implies
another linking step for every binary that is to be installed.

Hope that helps

Johannes

[email protected] wrote on 10/5/2006 4:43 PM:
> I have been able to successfully compile and install net-snmp 5.3.1 on a couple of my servers, but have run into an issue where most of the rest of my servers do not have ANSI C installed, so running make and make install on these machines fail.  I would like to simply compile the binaries on one of the machines that has ANSI C installed on it, but do not know the appropriate commands for make install.  Any help is appreciated as I am a novice in this area.
> 
> Thanks in advance

-- 
Johannes Schmidt-Fischer

InterFace AG                 phone  +49 (0)89 / 610 49 - 207
Leipziger Str. 16            fax    +49 (0)89 / 610 49 - 85
D-82008 Unterhaching         mobile +49 (0)171/ 787 76 01
http://www.InterFace-AG.com  mailto:[email protected]



------------------------------

Message: 6
Date: Fri, 6 Oct 2006 14:25:54 +0530
From: <[email protected]>
Subject: RE: Multiple row creation
To: <[email protected]>
Cc: [email protected]
Message-ID:
	<[email protected]>
Content-Type: text/plain;	charset="us-ascii"

Hi Dev,

Thanks for your response. But suppose one create (SNMPSET) success and
one create (SNMPSET) request fails then do we need to delete the first
row as SET request is atomic?

Regards,
Somenath


-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Dave Shield
Sent: Friday, October 06, 2006 2:11 PM
To: Somenath Pal (WT01 - Broadband Networks)
Cc: [email protected]
Subject: Re: Multiple row creation

On 06/10/06, [email protected] <[email protected]> wrote:
> Is it possible to create multiple rows in single SNMPSET request?

Yes

Dave



------------------------------

Message: 7
Date: Fri, 6 Oct 2006 10:06:22 +0100
From: "Dave Shield" <[email protected]>
Subject: Re: Multiple row creation
To: "[email protected]" <[email protected]>
Cc: [email protected]
Message-ID:
	<[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 06/10/06, [email protected] <[email protected]> wrote:
> Thanks for your response. But suppose one create (SNMPSET) success and
> one create (SNMPSET) request fails

Are these two separate SNMP SET requests, or two row creation
assignments, bundled within a single SNMP SET request?    I'm assuming
the latter (given your original question), but this phrasing tends to
imply the former.


>                                                      then do we need to delete the first
> row as SET request is atomic?

Yes - assuming this is a single SNMP SET request.
That's exactly right.   If the SET request fails, then neither row
should be created.

Of course, if the two rows are created using two separate SET
requests, then it's perfectly valid for one creation to succeed, and
the other to fail.  But if you're putting both creation assignments
into the same SET request, then they must stand or fall together.

Dave



------------------------------

Message: 8
Date: Fri, 6 Oct 2006 14:55:54 +0530
From: <[email protected]>
Subject: RE: Multiple row creation
To: <[email protected]>
Cc: [email protected]
Message-ID:
	<[email protected]>
Content-Type: text/plain;	charset="us-ascii"

Hi Dev,
Many thanks for your answer. Suppose I want to create two rows for two
different tables in a single SNMPSET request. But the handler (CREAT AND
GO) for two different rows will be different. Suppose the second
creation fails. Now how we can delete the first row? As execution of
first handler is finished. Is there any way to return back to the first
handler?

Regards,
Somenath 

 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Dave Shield
Sent: Friday, October 06, 2006 2:36 PM
To: Somenath Pal (WT01 - Broadband Networks)
Cc: [email protected]
Subject: Re: Multiple row creation

On 06/10/06, [email protected] <[email protected]> wrote:
> Thanks for your response. But suppose one create (SNMPSET) success and
> one create (SNMPSET) request fails

Are these two separate SNMP SET requests, or two row creation
assignments, bundled within a single SNMP SET request?    I'm assuming
the latter (given your original question), but this phrasing tends to
imply the former.


>                                                      then do we need
to delete the first
> row as SET request is atomic?

Yes - assuming this is a single SNMP SET request.
That's exactly right.   If the SET request fails, then neither row
should be created.

Of course, if the two rows are created using two separate SET
requests, then it's perfectly valid for one creation to succeed, and
the other to fail.  But if you're putting both creation assignments
into the same SET request, then they must stand or fall together.

Dave



------------------------------

Message: 9
Date: Fri, 6 Oct 2006 11:35:25 +0200
From: "Enric Bel Prim" <[email protected]>
Subject: Discovering peer engineID while sending INFORMS
To: [email protected]
Message-ID:
	<[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Hi. I'm trying to develop a snmp sub-agent, and one of its missions is to
send informs to a Network Management System when an alarm/warning occurs in
our device.
I've found that when the first inform is not 'aknowledged' by the trap
receiving system (after 5 retries), the agent doesn't send any inform to it
anymore.  After that, this message appears in the log everytime a new inform
need to be sent: "snmpd: send_trap: USM unknown security name (no such user
exists)"
After digging deeply into the code I've found that the agent only tries to
discover the peer engineID once per 'session':
send_v2trap -> send_trap_vars -> send_enterprise_trap_vars ->
netsnmp_send_traps -> send_trap_to sess -> snmp_async_send ->
snmp_sess_async_send -> _sess_async_send   calls to snmpv3_engineID_probe.
This function sets the session->flags SNMP_FLAGS_DONT_PROBE to prevent
recursion... but if the remote engine doesn't answer, this flag remains
set.  And, later, if a new inform needs to be sent the agent doesn't retry
to obtain the engineID again.

I've detected this behaviour using net-snmp versions 5.3.0.1 and
5.3.1libraries in a subagent module through agentx (SNMPV3) running on
Linux.
Is this behaviour correct?  Shouldn't the agent keep trying to obtain the
engineID of the receiver if the previous communication failed?

To correct this I've done the following modification (turn off the flag
SNMP_FLAG_DONT_PROBE if we have no answer) in function snmpv3_engineID_probe
in snmplib/snmp_api.c

            if (slp->session->securityEngineIDLen == 0) {
                DEBUGMSGTL(("snmp_api",
                            "unable to determine remote engine ID\n"));
            session->flags &= ~SNMP_FLAGS_DONT_PROBE; /* EBP */
                return 0;
            }

But this modification provoques two effects: 1) the engineID is requested
for every inform while we have no answer from the receiver (OK ;)))).
2)The informs are repeated a lot of times when the receiver acknowledge them
(BAD!!!).

My snmpd.conf ...
createUser snmp_usr MD5 snmp_pass
trapsess -C i -v 3 -u snmp_usr -a MD5 -A snmp_pass -l authNoPriv
172.16.2.5:162

Any comments would be appreciated..
Thanks in advance.
Enric.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users/attachments/20061006/978b8f45/attachment.html 

------------------------------

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

------------------------------

_______________________________________________
Net-snmp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


End of Net-snmp-users Digest, Vol 5, Issue 13
*********************************************

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
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
snmptrapd.conf (application/octet-stream, 1.4 KB)
##########################################################################
#
# snmptrapd.conf
#
#   - created by the snmpconf configuration program
#
###########################################################################
# SECTION: Authentication options
#
#   Authentication options

# ignoreauthfailure: Ignore authentication failure traps
#   arguments: (1|yes|true|0|no|false)

ignoreauthfailure  1



doNotLogTraps  yes


###########################################################################
# 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
#   othe snmptrapd.conf manual page for details).
#   
#   arguments: oid|"default" program args
#traphandle SNMPv2-SMI::enterprises.11.2.4.3.19.3.1.3.2
#traphandle default /home/jitensa/a.out
traphandle SNMPv2-SMI::mib-2.13.3.1.1.2.1 /home/jitensa/RND/test kk
traphandle "default" /home/jitensa/RND/test k
traphandle default /home/jitensa/RND/test k
traphandle .1.3.6.1.2.1.13.3.1.1.2.1 /home/jitensa/RND/test k


doNotLogTraps  yes
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.