[CentOS] Checking last shutdown state

Joseph L. Casale JCasale at activenetwerx.com
Thu Aug 14 22:22:16 UTC 2008


>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




More information about the CentOS mailing list