[plug] ups driven automatic server shutdown

Daniel Pittman daniel at rimspace.net
Thu Jun 19 11:03:48 WST 2008


"Adam Hewitt" <ahewitt at theozhewitts.com> writes:

> I am currently trying to find a good solution for the above
> problem. So far all the options I have are either a lot of development
> or dont go far enough into what I need.

As pointed out elsewhere, NUT is probably the right solution to the UPS
interface part.  Outside that...

> What I am really after is something that can login to around 140
> servers and shut them down based on certain criteria, ie. applications
> and/or services on a single machine need to come down in a specific
> order, check to make sure they are down, if they aren't try bringing
> them down two more times before forcefully killing the
> app/service. 

...the usual behaviour in the face of a power failure is to put the
machine into a state where a power cycle will restart it, using the
system shutdown facility.

Your normal shutdown scripts are then responsible for all the ordering
constraints which, presumably, also apply during a scheduled server
restart.

> Once the server is brought down the shutdown controller needs to check
> that it is uncontactable before moving onto the next server. The
> servers need to have dependencies put next to them in order for the
> controller to shut them down in a specific order.
>
> I know I can do this on a linux server getting the results via snmp
> from the UPS (as well as environmental alarms and or serial access to
> a power circuit relay) and then use perl scripts to do the actual
> shutdown, however its more work than I wanted to do and I was kind of
> hoping for a commercial solution that can do the same thing using
> shutdown clients on each machine [ or similar ]. 

Well, NUT will happily run on all machines, call shutdown, and as far as
I can tell will achieve the results you are after.

It isn't commercial, but it should do. ;)

Regards,
        Daniel



More information about the plug mailing list