Powercadd Powerchute Network Shutdown V4.1

http://community.spiceworks.com/how_to/55064-how-to-gracefully-shut-down-vsphere-5-x-esxi-free-using-an-eaton-ups-with-ipm-and-the-command-line
  1. Powercadd Powerchute Network Shutdown V4.1 Download
  2. Powerchute Network Shutdown Download

Feb 19, 2016 I would say to look in to the PowerChute Network Shutdown v4.0 or v4.1 client. It's a VM from APC that runs on ESXi to do exactly what you want. The only piece you might have to get is the network card for your APC Smart UPS 1500 so the unit can be on the network. PowerChute Network Shutdown v4.3 (64-bit systems only) p This software only supports English language.Please carefully read the End User License Agreement (“EULA”) available above as it governs your use of this software.

NOTE:
-I use APC PCNS for Linux only. I didn’t use its PCNS because I don’t have APC UPS with NMC.
If I have NMC, I’ll use PCNS instead of apcupsd or still using apcupsd with pcnet settings
If someone want to donate me APC NMC, I’ll glad to test for them

-login as root to pcns and install apcupsd

# yum -y install apcupsd
-for linux based apt-get use these commands
# apt-get putty-toolsV4.1

# yum -y install openssh-clients

-test ssh using admin account

install pexpect using either these commands
or
# apt-get install python-pexpect

# cat /root/shutcucm.py

import sys
server_user = “<platform user>”
child = pexpect.spawn(‘ssh %s@%s’ % (server_user, server_ip))
child.timeout = 60
child.sendline(server_pass)
child.sendline(‘utils system shutdown’)
child.sendline(‘yes’)
child.expect(‘ Appliance is being Powered – Off …’)
print ‘Shutdown command successfully sent.’

-connect usb cable from pc to esxi

# cat /etc/apcupsd/apccontrol

prefix=/usr
APCPID=/var/run/apcupsd.pid
SHUTDOWN=/sbin/shutdown
SCRIPTDIR=/etc/apcupsd
if [ -f ${SCRIPTDIR}/${1} -a -x ${SCRIPTDIR}/${1} ]
${SCRIPTDIR}/${1} ${2} ${3} ${4}
# exit code 99 means he does not want us to do default action
exit 0
Download
fi
killpower)
echo “Apccontrol doing: ${APCUPSD} –killpower on UPS ${2}” | ${WALL}
${APCUPSD} –killpower
echo “Apccontrol has done: ${APCUPSD} –killpower on UPS ${2}” | ${WALL}
commfailure)
echo “Warning communications lost with UPS ${2}” | ${WALL}
commok)
echo “Communications restored with UPS ${2}” | ${WALL}
powerout)

Powercadd Powerchute Network Shutdown V4.1 Download

onbattery)
echo “Power failure on UPS ${2}. Running on batteries.” | ${WALL}
offbattery)
;;
if [ -f /etc/apcupsd/powerfail ] ; then
fi
failing)
echo “Battery power exhaused on UPS ${2}. Doing shutdown.” | ${WALL}
timeout)
echo “Battery time limit exceeded on UPS ${2}. Doing shutdown.” | ${WALL}
loadlimit)
echo “Remaining battery charge below limit on UPS ${2}. Doing shutdown.” | ${WALL}
runlimit)
echo “Remaining battery runtime below limit on UPS ${2}. Doing shutdown.” | ${WALL}
doreboot)
echo “UPS ${2} initiating Reboot Sequence” | ${WALL}
${SHUTDOWN} -r now “apcupsd UPS ${2} initiated reboot”
doshutdown)
echo “UPS ${2} initiated Shutdown Sequence” | ${WALL}
${SHUTDOWN} -h now “apcupsd UPS ${2} initiated shutdown”
echo “****** Executing ESXi Shutdown Command ******” | ${WALL}
plink -ssh -2 -pw password root@10.0.100.200 “/sbin/shutdown.sh && /sbin/poweroff”
annoyme)
echo “Power problems with UPS ${2}. Please logoff.” | ${WALL}
emergency)
echo “Emergency Shutdown. Possible battery failure on UPS ${2}.” | ${WALL}
changeme)
echo “Emergency! Batteries have failed on UPS ${2}. Change them NOW” | ${WALL}
remotedown)
echo “Remote Shutdown. Beginning Shutdown Sequence.” | ${WALL}
startselftest)
endselftest)
battdetach)

Powerchute Network Shutdown Download

battattach)
*) echo “Usage: ${0##*/} command”
echo ” warning: this script is intended to be launched by”
echo ” apcupsd and should never be launched by users.”
;;