Does your UPS software have any logging capabilities? I know APC's PowerChute+ software logs everything it does. There would be an entry in it's logs saying it was doing a clean shutdown. The system logs may also have something about the time the system shutdown too.
Does your UPS software have any logging capabilities? I know APC's PowerChute+ software logs everything it does. There would be an entry in it's logs saying it was doing a clean shutdown. The system logs may also have something about the time the system shutdown too.
Using apcupsd, the silly thing is I have a custom script that I have tested very well for shutdown of all the vm's (mix of p/hvm's). None of the DomU's or Dom0 shutdown right.
Obvioulsy apcupsd didn't call the script! I need to make the script log then do some testing.
/etc/apcupsd/apccontrol was edited to the following:
SHUTDOWN=/sbin/shutdown to SHUTDOWN=~/my_script.sh
I assume this was done as the process runs as root, the script is in the /root directory. Possibly that was actually a bad idea:) I moved the script to /etc/apcupsd and edited SHUTDOWN=/etc/apcupsd/my_script.sh
Sound right? Or do even I have this wrong?
Thanks! jlc
Joseph L. Casale wrote:
Using apcupsd, the silly thing is I have a custom script that I have tested very well for shutdown of all the vm's (mix of p/hvm's). None of the DomU's or Dom0 shutdown right.
[..]
Sound right? Or do even I have this wrong?
I like NUT(Network UPS tools) myself mainly for the web based interface for monitoring UPSs, and the ability to monitor lots of UPSs simultaneously from one spot(I modified the cgi script so I could embed it in html see http://portal.aphroland.org/ as an example). And of course it supports tons of different UPSs, not just APC (I've personally only tested APC and Cyberpower).
http://www.networkupstools.org/compat/stable.html (not sure if/where there are RPMs for it)
I haven't had a chance yet to test how it works with vmware(have not used Xen myself). Though vmware is configured to shut down the VMs when the host shuts down, I don't need the ups client in the guest VMs.
At my last company I had about a dozen UPSs to monitor and it was nice being able to see their status all at the same time from one web site. Also there is a nagios plugin for NUT as well which works seamlessly(though NUT changed their protocol in one of their recent major revisions).
vmware:/usr/lib/nagios/plugins# ./check_ups -H localhost -u apc UPS OK - Status=Online Utility=119.0V Batt=100.0% Load=25.0% |voltage=119000mV;;;0 battery=100%;;;0;100 load=25%;;;0;100
Sorry if this doesn't exactly answer your question :)
nate