On 30/11/12 11:44, Mark Rogers wrote:
On 30/11/12 11:07, steve-ALUG@hst.me.uk wrote:
A monitored UPS at least gives you the chance to attempt to shutdown gracefully, which an un-monitored one doesn't.
I've just pulled the UPS out for a bit of TLC. It's an APC Smart-UPS SC1500 so not a bad bit of kit; I've just ordered replacement batteries on the basis that the old ones are, well, old. [*]
The UPS has a serial connector for monitoring, so handy that my old server also has serial. So hopefully I can get all that set up this afternoon without too much grief.
I suggest you install apcupsd Comprehensive website here
http://www.apcupsd.com/manual/manual.html#supported-upses-and-cableshttp://www.apcupsd.com/manual/manual.html#frequently-asked-questions But see Q 1 & 4 re cables. APC uses customised serial cables not standard ones. You either have to buy one from APC (they do come with the UPS), or build one - there's a link.
I built one - I got a cheap 9 pin serial cable from Maplin, with a non-sealed connector, then un-soldered and re-soldered a couple of wires.
My apcupsd config was simple. Edit the config file to say it's using a serial port, and the serial port name.
UPSCABLE smart DEVICE /dev/ttyS0 (for serial port 1 etc)
(NB, I'm now using it via my custom cable, that's plugged into a Serial to USB converter! and set that up as DEVICE /dev/ttyUSB0 or 1...)
Set Timeout to 0. With a SmartUPS, apcupsd will then monitor the battery level, and initiate a shutdown when it falls below a certain level. If the power comes back on before then, then there's no shutdown.
I've also set my server's bios so that when power appears at the power socket it powers on.
I also use gapcmon to monitor the UPS and tell me of any power events. apcupsd can also drive a web-based power monitoring page if you prefer.
HTH Steve