Re: sending traps from embedded AgentX subagent

2006-12-14 Thread Dave Shield
On 14/12/06, David Arthur [EMAIL PROTECTED] wrote: I am unable to get traps from an embedded subagent. init_agent(agentSNMPAlert); // init agent library init_agentSNMPAlert();// run MIB module init init_snmp(agentSNMPAlert); // init

RE: sending traps from embedded AgentX subagent

2006-12-14 Thread David Arthur
Arthur Cc: net-snmp-users@lists.sourceforge.net Subject: Re: sending traps from embedded AgentX subagent On 14/12/06, David Arthur [EMAIL PROTECTED] wrote: I am unable to get traps from an embedded subagent. init_agent(agentSNMPAlert); // init agent library init_agentSNMPAlert

Re: sending traps from embedded AgentX subagent

2006-12-14 Thread Dave Shield
On 14/12/06, David Arthur [EMAIL PROTECTED] wrote: The send_easy_trap(5, 0) call is made after the init_xxx() calls and the agent processing loop is started. In the code fragment you posted, the send_easy_trap(5, 0) call is only made after the agent processing loop has *finished*. At which

Re: sending traps from embedded AgentX subagent

2006-12-14 Thread Dave Shield
[ First - *please* don't mail me privately, without copying any responses to the mailing list. I don't have the time or inclination to offer private, unpaid, SNMP consultancy. Keep discussions to the list, where others can both learn and offer advice. Thanks. ] On

RE: sending traps from embedded AgentX subagent

2006-12-14 Thread David Arthur
Dave, My apologies for the private email a bit ago, was unintentional reply button haste...won't happen again! OK - try running the master agent with the '-d' flag. Does it see the trap request coming from the subagent? This is what I get if I start with snmpd -d -Dagentx -mall: No log

Re: sending traps from embedded AgentX subagent

2006-12-14 Thread Dave Shield
, then the subagent won't be able to talk to the master agent for sending traps either. I think you need to look again at how your subagent is setting up the connection to the master agent. Dave - Take Surveys. Earn Cash. Influence

Programmatically sending traps

2006-09-08 Thread Barbara Knysz
I'm new to net-snmp, and have been tasked when sending traps to a specific host. I've used the mib2c to generate the code, but I have been unable to build the resulting c code - keep getting the message: undefined reference to `send_v2trapThis is the latest version of my makefile: OBJS1

Re: Programmatically sending traps

2006-09-08 Thread Dave Shield
On 08/09/06, Barbara Knysz [EMAIL PROTECTED] wrote: I'm new to net-snmp, and have been tasked when sending traps to a specific host. I've used the mib2c to generate the code, but I have been unable to build the resulting c code - keep getting the message: undefined reference to `send_v2trap

Sending traps

2006-05-10 Thread Wesley Naves de Faria
Hi coders, I created a mib that check an service of my server and set the flag of the services as OK(0), Warning(1), Critical(2) NoResponse(3). So, i need that when change the state of flag the snmp send a trap. I tried to use the monitor in snmpd.conf, but if i put lines ( flag == 0or

Re: how to specify source IP address / interface when sending traps (with Solaris IP multipathing )

2005-08-18 Thread Thomas Anders
Thomas Anders wrote: Brian A. Seklecki wrote: ...it should really say, Specify source address used by command-line tools and the agent daemon snmpd(8) when sending traps and informsetc. Thanks for the suggestion. We'll improve the documentation accordingly. I've just done that for 5.1

Re: how to specify source IP address / interface when sending traps (with Solaris IP multipathing )

2005-08-16 Thread Brian A. Seklecki
On Tue, 16 Aug 2005, Russell Bell wrote: Is the problem definitely fixed in 5.1.3 then ? Re the code similarity, Matt copied the WIN32 version of get_myaddr() in 5.1.2 snmplib/system.c and I'm going to find out this morning. The changelog between 5.1.2 and 5.1.3 is something like 30 pages

Re: how to specify source IP address / interface when sending traps (with Solaris IP multipathing )

2005-08-16 Thread Brian A. Seklecki
(8) when sending traps and informsetc. === Patching for net-snmp-5.1.3p2 1 out of 3 hunks failed--saving rejects to agent/mibgroup/mibII/tcpTable.c.rej *** patch-agent_mibgroup_mibII_tcpTable_c did not apply cleanly 1 out of 1 hunks failed--saving rejects to agent/mibgroup

Re: how to specify source IP address / interface when sending traps (with Solaris IP multipathing )

2005-08-15 Thread Robert Story
On Sat, 13 Aug 2005 14:10:22 +1000 Russell wrote: RB What we've ended up doing is changing get_myaddr() in snmplib/system.c RB which works; the primary IP address (the address returned by RB gethostbyname) is sent in the SNMP pdu. [Rob, I've sent you the changed RB system.c] RB [...] RB While the

Re: how to specify source IP address / interface when sending traps (with Solaris IP multipathing )

2005-08-15 Thread Brian A. Seklecki
This is really crazy. I just started looking into this problem and this thread happens to be fresh. I have the same problem, except I need to be able to specify SNMP Trap UDP source addresses on systems acting as IPSec VPN gateways. It's hard to belive that no one has asked for this

Re: how to specify source IP address / interface when sending traps (with Solaris IP multipathing )

2005-08-15 Thread Robert Story
On Mon, 15 Aug 2005 18:23:46 -0400 (EDT) Brian wrote: BAS It's hard to belive that no one has asked for this feature in the years BAS that Net-SNMP has been around. Well, you gotta remember that multiple interfaces, ipsec and vpn have only gotten popular in the last few years.. BAS What sucks

Re: Debugging illegal instruction in v5.1.1 when sending traps

2005-08-12 Thread Robert Story
On Thu, 11 Aug 2005 11:30:27 -0400 [EMAIL PROTECTED] wrote: CRC the status line says, Program stopped at CRC 0x1007e668, the function list (I think) is empty, and the Stack window CRC has one line: ??. This means that it is too late, the stack is hosed. You need to find a way to reliably

Re: how to specify source IP address / interface when sending traps (with Solaris IP multipathing )

2005-08-12 Thread Robert Story
to use the floating IP address as the source RB address when sending traps ? RB RB We have tried setting clientaddr and starting the snmpd process as RB /usr/local/sbin/snmpd udp:203.52.xx.yyy, without success. Well, those were going to be my two suggestions. The OS selects the IP address, so you

RE: how to specify source IP address / interface when sending traps (with Solaris IP multipathing )

2005-08-12 Thread Russell Bell
To: Russell Bell Cc: net-snmp-users@lists.sourceforge.net Subject: Re: how to specify source IP address / interface when sending traps (with Solaris IP multipathing ) On Tue, 9 Aug 2005 18:04:06 +1000 Russell wrote: RB The problem that we are facing is that we are running in a Solaris IP RB multipathing

Debugging illegal instruction in v5.1.1 when sending traps

2005-08-11 Thread cnelson
As suggested here recently, I got my application in a debugger and recreated the problem. I'm running gdbserver on PPC (the target host) with Insight on x86 Linux (the development environment). When the problem occurs, the Source Window of Insight says, Select a function name to disassemble the

how to specify source IP address / interface when sending traps (with Solaris IP multipathing )

2005-08-10 Thread Russell Bell
sender. How can we configure NetSNMP to use the floating IP address as the source address when sending traps ? Please note, this behaviour is the same when sending traps to localhost or to another host on the network. We have tried setting clientaddr and starting the snmpd process as /usr/local/sbin

Re: Illegal instruction when sending traps in v5.1.1

2005-08-10 Thread Robert Story
On Fri, 05 Aug 2005 10:33:17 -0400 [EMAIL PROTECTED] wrote: CRC template_v2pdu-command = sink-pdutype; CRC send_trap_to_sess(sink-sesp, template_v2pdu); CRC CRC the last executable line in that (sending with template_v2pdu) is where CRC my program crashes. can you get

Re: Illegal instruction when sending traps in v5.1.1

2005-08-10 Thread cnelson
On Fri, 05 Aug 2005 10:33:17 -0400 [EMAIL PROTECTED] wrote: CRC template_v2pdu-command = sink-pdutype; CRC send_trap_to_sess(sink-sesp, template_v2pdu); CRC CRC the last executable line in that (sending with template_v2pdu) CRC is where my program crashes. can

Illegal instruction when sending traps in v5.1.1

2005-08-05 Thread cnelson
I wrote a few weeks ago about a problem I was having in send_v2trap(). I've narrowed it down but while I continue to research, I'd appreciate any feedback or insight members of this list have. In agent_trap.c, toward the end of netsnmp_send_traps(), I find: /* * Now loop through the

Re: Illegal instruction when sending traps in v5.1.1

2005-08-05 Thread cnelson
printf(%s:%d, sink-version:%d\n, __FILE__, __LINE__, sink-version); between the for and the if, the value printed is 193. OK. So I see that 193 is AGENTX_VERSON_BASE | 0x1. I guess that's valid. I'll dig deeper. --- SF.Net email is

Re: about snmpd sending traps/informs

2005-08-04 Thread Robert Story
On Wed, 20 Jul 2005 17:27:29 +0200 maxime wrote: MS First, I'd like snmpd to watch if some values in the system have MS changed. I know how to do this for things in MIBs, but how could i do MS this for a number in a file ? Is there a node of the ucdavis MIB that MS allows to do this or should i

about snmpd sending traps/informs

2005-07-20 Thread maxime saintes
Hi, i talked a bit about this in a previous mail but it was not clear and not in the subject of the mail so i write a clearer new one. First, I'd like snmpd to watch if some values in the system have changed. I know how to do this for things in MIBs, but how could i do this for a number in

Re: Sending traps

2005-05-03 Thread Dave Shield
On Mon, 2005-05-02 at 16:20, Mauricio Reyes wrote: I need to calculate the network utilization that my agent uses when sending notification traps to the manager. Is there a way to calculate the amount of bytes used by a trap? That depends on what's in the trap! The simplest way to calculate

Sending traps

2005-05-02 Thread Mauricio Reyes
Hello, I need to calculate the network utilization that my agent uses when sending notification traps to the manager. Is there a way to calculate the amount of bytes used by a trap? Thanks a lot. Mauricio. __ Do You Yahoo!? Tired of spam?

Re: Sending traps from an agentX subagent, and snmpd robustness

2004-11-22 Thread Users
On Mon, 22 Nov 2004 13:27:02 +1100 Russell wrote: RB I couldn't use agent_check_and_process() to wait for events because RB it ignores fd's registered with register_readfd(). Only receive() RB in snmpd.c uses external_readfd[]. Gack. We need to fix that... RB A separate question. The main

Re: Sending traps from an agentX subagent, and snmpd robustness

2004-11-21 Thread Russell Bell
I asked last week how best to send traps from an agentX subagent, where the trap originates in a separate thread from the main SNMP thread. With Rob Storey's help I've arrived at the the following solution, which works fine so far. In summary, the main thread creates a pipe, and the main loop

Re: Sending traps from an agentX subagent

2004-11-17 Thread Users
First of all, please post a new message, instead of replying to the digest and quoting the entire (unrelated!) digest. On Wed, 17 Nov 2004 18:30:04 +1100 Russell wrote: RB The subagent process is multi-threaded. Raising a trap works fine if I do RB it in the main thread [...] RB But, if I call

Re: Sending traps in another thread

2004-10-28 Thread Dave Shield
Robert Ok, lets see if I got this right. You have the main agent thread, Robert and two worker threads. The worker threads don't do any SNMP other Robert than to call send_v2trap. Is that right? Gary Yep you got it. Urk! I'm not sure that's safe. As far as I remember, doesn't the

Re: Sending traps in another thread

2004-10-28 Thread Vili Germic
Hi, Thanks to all, I'm also using Redhat9, pthread an mutex locking, anyway.. I create single session in thread for sending traps (not in main thread whrere sub agent is running). I'm using "Single session API" functions: snmp_sess_open(), snmp_sess_send() and snmp_sess_close()

Re: Sending traps in another thread

2004-10-28 Thread Dave Shield
I couldn't find function to create pdu for Single API use, so I asumed that snmp_pdu_create() function is thread safe!? Correct. Creating a PDU structure is safe enough. It's what you then *do* with it that needs care Dave PS: Please - no HTML mail.

Re: Sending traps in another thread

2004-10-28 Thread Users
On Thu, 28 Oct 2004 12:06:06 +0200 Vili wrote: VG if (pPdu != NULL) VG snmp_free_pdu(pPdu); //Here is the problem (segmentation fault)! VG (if I comment this line, works fine!) That's the problem. You are unconditionally deleting the PDU. You should only delete the PDU if you get an

Re: Sending traps in another thread

2004-10-28 Thread Users
On Thu, 28 Oct 2004 09:39:43 +0100 Dave wrote: DS Robert Ok, lets see if I got this right. You have the main agent thread, DS Robert and two worker threads. The worker threads don't do any SNMP other DS Robert than to call send_v2trap. Is that right? DS DS Gary Yep you got it. DS DS Urk! I'm

Re: Sending traps in another thread

2004-10-28 Thread Gary Clark
(Users) [EMAIL PROTECTED] Cc: Gary Clark [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, October 28, 2004 8:06 AM Subject: Re: Sending traps in another thread On Thu, 28 Oct 2004 09:39:43 +0100 Dave wrote: DS Robert Ok, lets see if I got this right. You have the main agent thread, DS Robert

Re: Sending traps in another thread

2004-10-28 Thread Gary Clark
Clark [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, October 28, 2004 3:39 AM Subject: Re: Sending traps in another thread Robert Ok, lets see if I got this right. You have the main agent thread, Robert and two worker threads. The worker threads don't do any SNMP other Robert than to call

Sending traps in another thread

2004-10-27 Thread Vili Germic
Hi all, I'm writting NET-Snmp sub agent. Has anybody tried to send traps in other thread that in main thread of sub agent? I'm having problems when snmp_free_pdu() is called. (segmentation fault). Any ideas on this? Has anybody do something like this? Best regards, Vili

Re: Sending traps in another thread

2004-10-27 Thread Users
On Wed, 27 Oct 2004 13:08:30 +0200 Vili wrote: VG Has anybody tried to send traps in other thread that in main thread of VG sub agent? VG I'm having problems when snmp_free_pdu() is called. (segmentation fault). VG Any ideas on this? Has anybody do something like this? Using any SNMP calls other

Re: Sending traps in another thread

2004-10-27 Thread Gary Clark
? Again adding trace is essential. Much appreciated, Garyc - Original Message - From: Vili Germic [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 27, 2004 6:08 AM Subject: Sending traps in another thread Hi all, I'm writting NET-Snmp sub agent. Has anybody tried to send

Re: Sending traps in another thread

2004-10-27 Thread Users
On Wed, 27 Oct 2004 08:47:42 -0500 Gary wrote: GC I have sent traps in using a pthread. Hi Gary, Do you mind if I ask a few questions about how your app works? We need to gather information to help identify what does and doesn't work. Even if you can only answer briefly, like 'yes/no', that

Re: Sending traps in another thread

2004-10-27 Thread Gary Clark
on. send_v2trap is what I am using. Much appreciated, Garyc - Original Message - From: Robert Story (Users) [EMAIL PROTECTED] To: Gary Clark [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, October 27, 2004 10:23 AM Subject: Re: Sending traps in another thread On Wed, 27 Oct 2004

Re: Sending traps in another thread

2004-10-27 Thread Users
On Wed, 27 Oct 2004 12:24:17 -0500 Gary wrote: GC GC Have you implemented any locking mechanism? GC GC GC GC Standard pthread mutexs were used. GC GC Can you elaborate on that? Where are they used? Who blocks who, and when? GC GC The download to the hardware device or upload can take time

Re: Sending traps in another thread

2004-10-27 Thread Gary Clark
. Once complete the lock is disabled. The thread resources are removed once the thread exits. Thanks, Garyc - Original Message - From: Robert Story (Users) [EMAIL PROTECTED] To: Gary Clark [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, October 27, 2004 1:28 PM Subject: Re: Sending

Re: Sending traps from GNU/Linux server to NMS

2004-08-17 Thread Dave Shield
Is there no way to send traps through the snmpd agent, Yes. Please see the FAQ entries What traps are sent by the agent? Where are these traps sent to? Im trying to send the following traps from my GNU/Linux Box: - Coldstart - Warmstart A coldstart trap will be sent

Re: Sending Traps

2004-08-17 Thread Dave Shield
hi all, do anybody know how to sent traps via snmp. How to configure our agent to sent traps for our oid? Have a look at using mib2c with the 'mib2c.notify.conf' file. That will generate a suitable template routine for generating a given trap. Then you just need to call this routine

Sending Traps

2004-08-14 Thread deepa chakkunni
hi all, do anybody know how to sent traps via snmp. How to configure our agent to sent traps for our oid? Ur advice is really appreciated. regards Deepa = It's not your APTITUDE but your ATTITUDE that decides your ALTITUDE!.Take care

Re: sending traps automatically via the agent

2004-08-09 Thread Dave Shield
The net-snmp daemon can be configured to check processes/disks. for example: disk / 1 many people think that if the above mount point grow up above 10M size , the net-snmp daemon should send trap to the trap server(NMS, trapd). but it's not. Probably because those people

sending traps automatically via the agent

2004-08-07 Thread Avishay Aton
Hi everyone, I suppose i have come actross this question before, but it's a very important issue, so I'll ask it again kindly. The net-snmp daemon can be configured to check processes/disks. for example: disk / 1 many people think that if the above mount point grow up above 10M size , the

<    1   2