Re: snmpd not responding - fixed!!

2008-01-18 Thread Dan Miller (Kromos)
Okay, I'm a liar... the snmpd.conf file that I was using on the working machine was *not* the same as the one on the failing machine. How they got to be different, I don't know, but they were. When I put the "good" snmpd.conf in the correct location on the "bad" machine, it works fine. Anyw

snmpd not responding to commands consistently (redux)

2008-01-18 Thread Dan Miller (Kromos)
I have net-snmpd (ucd-compat) running on two machines. net-snmp 5.4.1 was compiled and installed on each machine, from identical code. Both machines are kernel 2.6.11.4 (SuSE 9.3). For testing, I am running a Windows utility which sends GetRequest commands to the target, using our oids, and d

Re: A config file command for specifying an exact engineID

2008-01-18 Thread Nathan Schrenk
On Jan 18, 2008 3:45 PM, Dave Shield <[EMAIL PROTECTED]> wrote: > On 18/01/2008, Nathan Schrenk <[EMAIL PROTECTED]> wrote: > >there is no way to > > specify the engineID exactly. I'd like to be able to configure the > engineID > > using a command that just takes th

Re: A config file command for specifying an exact engineID

2008-01-18 Thread Dave Shield
On 18/01/2008, Nathan Schrenk <[EMAIL PROTECTED]> wrote: >there is no way to > specify the engineID exactly. I'd like to be able to configure the engineID > using a command that just takes the hex-encoded raw engineID, similar to the > oldEngineID command. Maybe I'

Re: snmpd discarding its settings

2008-01-18 Thread Dave Shield
On 18/01/2008, Dan Miller (Kromos) <[EMAIL PROTECTED]> wrote: > However, while putting it in the correct place (/usr/local/share/snmp in my > case) has gotten rid of the warning message in snmpd.log, it hasn't affected > the communication problem that I'm experiencing. Hopefully somebody has > som

shared libraries - do I have a problem??

2008-01-18 Thread Dan Miller (Kromos)
Ho, I was excited by the --enable-static --disable-shared options that Mr. Anders told me about... the build went fine with both of those (plus -Bstatic)... until I got to linking my own code!! *I* have a shared library that my module needs to link to!!! Oops... - so, am I just dead on this

A config file command for specifying an exact engineID

2008-01-18 Thread Nathan Schrenk
Hi, I'm working on a project to include an SNMP agent based on NET-SNMP's snmpd in an ethernet switch. The switch's command-line interface provides the ability to specify the SNMP agent's engineID. This is somewhat problematic with NET-SNMP (at least as of version 5.4.1) because there is no way

Re: snmpd discarding its settings

2008-01-18 Thread Dan Miller (Kromos)
Ahh!! Thank you, Dave!! I *suspected* that /var wasn't a logical place for a conf file, but I didn't know where else to look. In the old days, we put it in /etc, but I could see that this version wasn't looking there... However, while putting it in the correct place (/usr/local/share/snmp in m

Re: snmpd discarding its settings

2008-01-18 Thread Dave Shield
On 18/01/2008, Dan Miller (Kromos) <[EMAIL PROTECTED]> wrote: > I generated an snmpd.conf file on each machine, and copied it to > /var/net-snmp That's not the best location for your snmpd.conf file. This is used by the agent to save persistent information (which may well overwrite your initial se

Re: static snmpd - is this possible??

2008-01-18 Thread Dan Miller (Kromos)
o... That's cool!! I'll try those out!! Dan - Original Message - From: "Thomas Anders" <[EMAIL PROTECTED]> To: "Dan Miller (Kromos)" <[EMAIL PROTECTED]> Cc: Sent: Friday, January 18, 2008 13:25 Subject: Re: static snmpd - is this possible?? > Dan Miller (Kromos) wrote: >> In the

Re: static snmpd - is this possible??

2008-01-18 Thread Thomas Anders
Dan Miller (Kromos) wrote: > In the old days (linux kernel 2.2, UCD snmpd 4.1), we could just distribute > snmpd alone, and it worked. It was a 1.6MB file, but it worked. Is there > any way that I can build net-snmp (in ucd compat mode) so that the one file > is complete and ready to run?? I

snmpd discarding its settings

2008-01-18 Thread Dan Miller (Kromos)
I have net-snmpd (ucd-compat) running on two machines. It was compiled and installed on each machine, from identical code. On one machine, I can successfully read snmp data back (including our mib) using an external snmp client. On the second machine, I cannot do so. I generated an snmpd.conf

static snmpd - is this possible??

2008-01-18 Thread Dan Miller (Kromos)
I'm trying to debug some problems with net-snmp, running in ucd-compatibility mode. After extensive, frustrating testing, I finally discovered that agent/.libs/snmpd doesn't even contain my mib-module code in it - so running that binary didn't give me any of my changes... mind you, it didn't

Re: bad locking code for multi-threaded applications

2008-01-18 Thread Sergey Matveychuk
Thomas Anders wrote: > Sergey Matveychuk schrieb: >> I've add a simple waiting loop and messages gone. A patch in an >> attachment. I do no magic with autoconf and includes is not enveloped >> with #if. May be somebody can do this work? > > Please submit to http://www.net-snmp.org/patches so it wo

Re: bad locking code for multi-threaded applications

2008-01-18 Thread Thomas Anders
Sergey Matveychuk schrieb: > I've add a simple waiting loop and messages gone. A patch in an > attachment. I do no magic with autoconf and includes is not enveloped > with #if. May be somebody can do this work? Please submit to http://www.net-snmp.org/patches so it won't get lost. +Thomas -- T

bad locking code for multi-threaded applications

2008-01-18 Thread Sergey Matveychuk
Hello. I've written a multi-threaded puller for getting a lot of SNMP data. When the application do pulling I see the messages: _callback_lock already locket in snmp_call_callbacks netsnmp_assert 1==_locks[major][minor] failed callback.c:126 _callback_lock() Looking at callback.c I've found a

Re: Detect SNMP packet

2008-01-18 Thread Devvrat Tripathi
> > > The simplest approach is probably to insert code into the routine > netsnmp_agent_check_parse() (see 'agent/snmp_agent.c'). > This is called after the request has been received and parsed, > but before it is processed. > > Within this routine, you could extract the context of the request,

Re: NET-SNMP 5.1.1: Help with tables handler

2008-01-18 Thread Dave Shield
On 18/01/2008, Baltazar Francois <[EMAIL PROTECTED]> wrote: > The problem is that I need one single handler function to process SET and > GET commands for several tables of my MIB. Why? The usual model would be to register each table individually, with its own handler function. This allows the

NET-SNMP 5.1.1: Help with tables handler

2008-01-18 Thread Baltazar Francois
Hi, I need some help with net-snmp tables handler. The problem is that I need one single handler function to process SET and GET commands for several tables of my MIB. This handler needs to consult an external module to reply to GET, and needs to pass SET data to an external module for storag

Re: Detect SNMP packet

2008-01-18 Thread Dave Shield
On 17/01/2008, Devvrat Tripathi <[EMAIL PROTECTED]> wrote: > I would like to get the responses for these pdu's from different snmp agents > located at some other place depending on the context supplied with the pdu. > Now the problem is that i do not know these contexts before hand and also > that