Harendra,

 

Check for SNMP agents supplied with the OS or by the hardware
manufacturer.  Most will detect hardware faults and send traps.  Dell,
HP, and IBM all supply a sub-agent that will alarm on virtually any
hardware fault.

 

If that is not available, consider using the agent "Arbitrary Extension
Commands" function.  I have never used them for traps, so it may not be
appropriate.

 

If you can detect the hardware fault with a script (you could have it
poll every couple of seconds), then you can have that script execute an
snmptrap command with a "fake" OID that your management system will
recognize.  This method means you don't have to write a subagent.

 

An expert like Dave Shield could probably comment on the viability of
this option.

 

Good luck.

 

Michael Peoples

Senior Systems Manager

AT&T - ATTSI

Office: 614-789-8559

Cell:    614-886-0923

FAX:   614-789-8975

[email protected] <mailto:[email protected]> 

From: Harendra Pratap Singh [mailto:[email protected]] 
Sent: Wednesday, March 31, 2010 8:36 AM
To: [email protected]
Subject: How to write a code to send a trap when we remove power cable?

 

Hi All,

 

I am using suse linux and I snmpd as master agent. I want to write a
sub-agent which sends trap upon removing one power cable(there are two
slots available both can be connected at the same time). Thanks in
advance.

 

 

Thanks,

Harendra

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to