hi background: windows xp and netsnmp-5.5 my snmpd.conf contains trapsink localhost public trapsink localhost private trap2sink localhost public trap2sink localhost private
rocommunity public localhost rwcommunity private localhost syscontact "GANESH Y" syslocation COMMUNICATIONS and snmptrapd.conf contains disableAuthorization yes traphandle SNMPv2-MIB::coldStart c:/usr/bin/traphandle.pl cold traphandle SNMPv2-MIB::warmStart c:/usr/bin/traphandle.pl warm traphandle IF-MIB::linkDown c:/usr/bin/traphandle.pl down traphandle IF-MIB::linkUp c:/usr/bin/traphandle.pl up and my traphandle.pl contains #!/usr/bin/perl # A simple trap handler my $TRAP_FILE = "c:/usr/snmp/traps.log"; my $host = <STDIN>; # Read the Hostname - First line of input from STDIN chomp($host); my $ip = <STDIN>; # Read the IP - Second line of input chomp($ip); while(<STDIN>) { chomp($_); push(@vars,$_); } open(TRAPFILE, ">> $TRAP_FILE"); $date = `date`; chomp($date); print(TRAPFILE "New trap received: $date for $OID\n\nHOST: $host\nIP: $ip\n"); foreach(@vars) { print(TRAPFILE "TRAP: $_\n"); } print(TRAPFILE "\n----------\n"); close(TRAPFILE); after this i started the snmptrapd daemon by using net start "net-snmp Trap handler" c:\usr\bin\snmptrap -c public -v 2c localhost " " SNMPv2-MIB::snmpTraps SNMPv2-MIB::sysLocation.0 s "just here" is showing nothing is this cofigurarion correct for snmptrapd> if not how to configure the snmptrapd? could you send example of config information for snmtrapd and how to write traphandler code in c ? thank you with regards ganesh y http://www.bel-india.com Visit BEL Website Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Bharat Electronics or supp...@bel.co.in immediately and destroy all copies of this message and any attachments. ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users