I have some further questions/observations on this subject. The reason that I have not been able to send my own Enterprise specific trap is that it does not have any additional var-binds associated with the trap i.e I want to send the trap with an empty associated var-bind list. e.g Bart in your example if I send a LinkUp trap as follows the trap is not sent.
C:\Perl\bin\perl -e "use SNMP; $SNMP::verbose=1; $SNMP::debugging=2; $SNMP::dump_packet=1; my $session = new SNMP::TrapSession(Community => \"public\", Port => 162, Version => \"2c\"); $session->trap(oid => \"linkUp\");" I can send my trap like so, but I have ahad at add on an optional var-bind the SysLocation field to make it work!: C:\Perl\bin\perl -e "use SNMP; $SNMP::verbose=1; $SNMP::debugging=2; $SNMP::dump_packet=1; my $session = new SNMP::TrapSession(Community => \"public\", Port => 162, Version => \"2c\"); $session->trap(oid => \"1.3.6.1.4.1.2257.11.1.1.0.0.9\", [[sysLocation,0,\"Here\"]]);" In response to your earlier question about omitting the uptime field the SNMP.pm perl module seems to be making the following call at line 1191: my $uptime = $param{uptime} || SNMP::_sys_uptime(); The call to SNMP::sys_uptime() seems to be returning a negative value and not the correct sysUpTime. Note the correct sysUptime is obtained when performing a get-request on my agent. Regards, Ali Please consider the environment before printing this email ----------------------------------------------- This email and any attached files contains company confidential information which may be legally privileged. it is intended only for the person(s) or entity to which it is addressed and solely for the purposes set forth therein. If you are not the intended recipient or have received this email in error please notify the sender by return, delete it from your system and destroy any local copies. It is strictly forbidden to use the information in this email including any attachment or part thereof including copying, disclosing, distributing, amending or using for any other purpose. In addition the sender excludes all liabilities (whether tortious or common law) for damage or breach arising or related to this email including but not limited to viruses and libel.
<<image/gif>>
------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________ 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