Bluehost.com Web Hosting $6.95

snmpd: send_trap: Timeout

This is a discussion on snmpd: send_trap: Timeout within the SNMP Coders forums, part of the Networking and Network Related category; hi I installed Net-snmp in my linux rh9 machine. after installing and configuring the AGENT. I started the agent ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-08-2005
Asha K
 
Posts: n/a
Default snmpd: send_trap: Timeout

hi

I installed Net-snmp in my linux rh9 machine.

after installing and configuring the AGENT.

I started the agent daemon using

snmpd -f -Le

i get this error and then the Agent starts

snmpd: send_trap: Timeout
NET-SNMP version 5.2.1.rc3

I am also trying to send a trap using the following program but the
trap is not seen in the SNMPTRAPD daeman.

pls Help.

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

/*
* Note: this file originally auto-generated by mib2c using
* : mib2c.notify.conf,v 5.3 2004/04/15 12:29:19 dts12 Exp $
*/

#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include "projTrapMod.h"

static oid snmptrap_oid[] = { 1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0 };

int
send_trapRecord_trap(void)
{
netsnmp_variable_list *var_list = NULL;
oid trapRecord_oid[] = { 1, 3, 6, 1, 4, 1, 7778, 1, 2 };
oid description_oid[] = { 1, 3, 6, 1, 4, 1, 7778, 1, 1, 4, 0 };
oid processName_oid[] = { 1, 3, 6, 1, 4, 1, 7778, 1, 1, 1, 0 };
oid severity_oid[] = { 1, 3, 6, 1, 4, 1, 7778, 1, 1, 3, 0 };
oid timeOfOccurence_oid[] = { 1, 3, 6, 1, 4, 1, 7778, 1, 1, 2, 0 };

/*
* Set the snmpTrapOid.0 value
*/

char *proc_name = "Process11";
char *desc_text = "Process desc";
char *time_a = "12:0:17";
int seve=1;


snmp_varlist_add_variable(&var_list,
snmptrap_oid, OID_LENGTH(snmptrap_oid),
ASN_OBJECT_ID,
trapRecord_oid, sizeof(trapRecord_oid));

/*
* Add any objects from the trap definition
*/
snmp_varlist_add_variable(&var_list,
description_oid, OID_LENGTH(description_oid),
ASN_OCTET_STR,
(u_char *)&desc_text,strlen(desc_text));

snmp_varlist_add_variable(&var_list,
processName_oid, OID_LENGTH(processName_oid),
ASN_OCTET_STR,
(u_char *)&proc_name,strlen(proc_name));

snmp_varlist_add_variable(&var_list,
severity_oid, OID_LENGTH(severity_oid),
ASN_INTEGER,
(u_char *)&seve,sizeof(seve));

snmp_varlist_add_variable(&var_list,
timeOfOccurence_oid,
OID_LENGTH(timeOfOccurence_oid),
ASN_OCTET_STR,
(u_char *)&time_a,strlen(time_a));

/*
* Add any extra (optional) objects here
*/

/*
* Send the trap to the list of configured destinations
* and clean up
*/
send_v2trap(var_list);
snmp_free_varbind(var_list);

return SNMP_ERR_NOERROR;
}
-----------------------------------------------------------------------------------------------------

I tried sending a ping to localhost it works perfect.

Kindly help..

regards,

Asha


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:11 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0