Reboot APC PDU outlet port remotely with SNMPv3.

March 26th, 2012 by Andrea Matesi 2141 Views

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?

Senior Professional Network and Computer Systems Engineer during work hours and father when home.

Andrea strives to deliver outstanding customer service and heaps of love towards his family.

In this Ad-sponsored space, Andrea shares his quest for "ultimate" IT knowledge, meticulously brought to you in an easy to read format.

Rate this post

Posted in LINUX, System Administration | Comments Off on Reboot APC PDU outlet port remotely with SNMPv3.

Comments are closed.