A very nice Killer-App offered by the sophisticated APC PDUs is the remote reboot feature with SNMPv3.

Say you have a crashed Linux box powered by power outlet port n.23 from an APC PDU and you need to reboot it.

The standard procedure requires you to STOP what are you doing and physically go inside your datacenter, then manually poweroff/poweron this OOM-d3ad linux box.

But if you happen to have an APC PDU powering this Linux box, this process can easily be automated, by using a combination of SNMPv3 and another linux box capable of sending snmp commands to such APC PDU.

Generally the process is just a matter of typing a command similar to the following (from your Workstation Linux box):

[root@centos-nms ~]# snmpset -v 3 -a md5 -A p@ssw0rd -x des -X p@ssw0rd -u user -l authPriv PDU.IP.Address sPDUOutletCtl.23 integer 3

This command will set the PDU Outlet Port n. 23 to a status of "3", which means "perform an outlet powerOFF/powerON cycle".

Provided your stuck Linux Box does have the BIOS feature "Always ON" or "Last Power State", the previous command will perform an OOB reboot which won't disturb your lazy arse!

If the previous command was performed successfully, you'll receive an output similar to this:

PowerNet-MIB::sPDUOutletCtl.23 = INTEGER: outletReboot(3)

Very useful, uh?

Rate this post