After last week's wind storm took down my servers, we decided to invest in a UPS to keep the servers up even when the lights are flickering. So this morning I hooked up an APC UPS to the two servers, servy and phantom, and the network switch between them. But, as usual, nothing is ever easy, I had some trouble getting the computers to communicate with the UPS.
The basic idea is that when the UPS batteries get below a certain percent, the servers will do a clean shutdown. But for that to work, the computers have to be able to communicate with the UPS. The UPS only comes with Windows software, but, of course, that begs the question: why would anyone want to protect a Windows computer? I guess they figure that anyone smart enough to use Linux is smart enough to download and install the software themselves.
So the first step at getting software, after some research, I discovered a product called NUT, which purported to do what I wanted. So I installed first and asked questions later. Once I installed, and discovered it wasn't plug-and-play, I went in search of documentation. That's when I discovered that the official NUT site only had documentation for 2.2, and the official ubuntu repository download was 2.4. Following the instruction got me nowhere, except a bunch of error messages that say 'this option no longer supported', with no indication what replaced it.
Plan B, I did a little more research and discovered acpupsd, which seemed semi-official (though not supported by ubuntu). Configuration of that was a snap, and things seemed to be going good, except after starting it, it silently failed. A quick tail of /var/log/syslog showed a nasty looking error message 'apcupsd fatal error in linux-usb.c at line 609' A google of this message indicated that other people where getting it, but none of their solutions worked for me. The last thing I tried was to mess around with the /etc/fstab to create a /proc/bus/usb, as it apparently used that as an interface for connecting to usb devices, and my system didn't have one. Once I added it into the /etc/fstab I didn't know how to get the fstab reloaded, so I rebooted my computer. That cause an error message because it didn't like the entry in /etc/fstab when it tried to load it. So I took out the new entry. I looked in syslog to see what might be the matter with the line in fstab, when I noticed that acpupsd was now running. Running acpaccess gave a screen dump of the status of the UPS, so I guess rebooting the machine with the UPS usb cable plugged in caused everything to work.
Still to do, I have to get acpupsd to talk over the network. I would like to be able to have a GUI tool that will show the status at a glance on one of my workstations, and also I need to get both of the computers hooked up to it to shutoff when the batteries get low. But that is next weekend. And then the big test...unplugging it from the wall, and seeing how long they stay up, and making sure that they shutdown correctly.
On another topic...I was looking around for set-top internet boxes that might allow me to cut my umbilical cord with the cable company. While searching for one to buy, I came across a blog that set up and old Windows Laptop with Hulu Desktop and connected it to the TV instead of a brand-name set-top box. And with the set-top boxes costing more than $300, that seems an economical solution. Plus I don't like the idea of being locked-in to whatever software the set-top box deems I should run. I like being able to install whatever software is available, especially in the dynamic first days of internet TV when everything is bound to change monthly if not weekly. So I may see what kind of computer I can scrap together to run one of these things. I tried the hulu desktop with my downstairs ubuntu, and it worked like a charm. Plus I plugged in the remote that used to work with my HP media center PC, and that worked too. So I'm already counting the money I can save canceling cable. Maybe next week after I use Hulu Desktop and other media options for a week to try it out.
No comments:
Post a Comment