Thursday, February 23, 2006

SNMP trap monitoring and trap generating

Find where the snmptrapd is installed. ( I found it is /usr/sbin)
Give the following command as the su -
snmptrapd -f -Le
If a SNMP trap is generated you will see it in the console.

To generate a SNMP trap manually ( With this you can verify that snmptrapd is working!!)

There is a handy tool (Look in http://www.ncomtech.com/software/TrapGen) to generate traps. The trapgen for linux is available at smb://fileserver/public/software/linux.
Extract the tool and give the command ./trapgen -f input.txt or ./trapgen -d as the su -
This would generate a SNMP trap and if the snmprapd is running u can see the trap logged there.

No comments: