Monday, November 22, 2010

Rack hardware power control

For power control of my rack hardware I am using APC master switches. These allow web, telnet, or snmp based control of 8 power switches per unit. It's a pain to go through all the ports of two units to power up the rack each time I'm ready to work so I found the snmp set commands to switch the outlets and created several batch files


The oid for my switches is below along with the sample syntax for a dos file that takes parameters of device and state. The device being the outlet number and state being 1 for on or 2 for off.

snmpset -r:10.10.10.10 -c:private -o:1.3.6.1.4.1.318.1.1.4.4.2.1.3.%1 -val:%2 -tp:int

I have created other hard set batch files such as s1 that is hard set with the port. So I can type 'r1 on' or 'r1 off' to turn Router1 on or off. A combined file rackoff.bat does all the devices at once.

No comments:

Post a Comment