From the archive
Install UPS using Eaton 3S with Arch Linux
On this page

I recently bought a UPS for my home workstation. As I am using software RAID, a power failure is not acceptable with the software cache turned on. However, turning off software cache will result in a significant performance loss, so I decided to get a UPS. And now I am writing this article and hopefully it can help you.
How did I choose my UPS?
As I have only a workstation with no graphics card or monitor connected, I do not need an expensive UPS which has thousands of VA and hours of power supply. All I need is a system that properly turns off my computer when the power goes off. I first decided to buy a power meter to measure the power consumption of the server, which you can get for about A$25. I created a little C program that consumes 100% of the CPU, and at the same time I used the dd command to write data to all the hard drives. I had a maximum power consumption of 128W, which is far less than the estimated maximum power consumption for my system (I think it was about 380W when I was using a power consumption tool online). From this measurement, I know that I probably need only the simplest one.
I looked through different vendors available in Melbourne, Australia, and compared their prices and the drivers they support. APC seems to have the best UPS for Linux, both in terms of the product itself and the software support. However, the problem for me is that their products are more expensive and difficult to get in stores in Melbourne. Finally I decided to go for the Eaton 3S. This UPS is a relatively good one with a competitive price and enough features. It also has a very good web-based configuration interface for almost all systems. As it is really cheap even in Australia, I got the 700VA one for $119 from a local store. It comes with a 3-year warranty so I am generally very happy about that.
How do I make Eaton 3S work?
It is pretty easy. The UPS has 3 ports providing battery backup, even though there are 6 ports on the board. The other 3 are just for protection, not for battery backup. It comes with a USB cable, and you can just plug it into a USB port on your machine, and it will display something like this:
cat /var/log/messages | grep EATON Aug 24 15:08:38 root-server kernel: [ 7.589102] hid-generic 0003:0463:FFFF.0003: hiddev0,hidraw2: USB HID v10.10 Device [EATON Eaton 3S] on usb-0000:00:14.0-14/input0
As you can see, the system has no problem recognising it and seems to be really happy. The next step is to download the software for configuration and set-up. I think you know where to download the software; otherwise, I would think you may not need a UPS. Just joking. Anyway, you can go to the Eaton website, register your product, and you should be able to download it.
Run the installer for your operating system. As I am using Arch Linux and connecting to my server using SSH, I am using the command-line version of the installer. You will see a licence agreement and by pressing space you can quickly go to the end of that. Then you may want to specify a location for the software, which I set up as /opt/Eaton/IPP.
After installation you will be able to find a few files in the directory. And then you can run the mc2 file to start the listener daemon. If the daemon does not work after 1 minute, try to run bin/mc2_wd.sh as well, and then you should be able to view the configuration website in your browser.
Configuration and testing
If you have a GUI on the machine you are connecting the UPS to, then you can go to http://localhost:4679; otherwise, you can navigate to http://ip.of.your.server:4679, which will work as well. If your network environment is not secure, navigate to the https version on port 4680, and you should see a blue-themed website, where you can log in and configure it.
If you can see that screen, I think you will not have any problem understanding the configurations in there. Just for people who haven’t got this device, I will list the key features of this software.
Generally speaking, you can see the status of the UPS, see events and logs, create actions to notify you when something is happening, configure shutdown criteria, and create and manage users.
Quick wrap up
Yes, it is really easy to use a USB-based UPS. I would imagine a network one would be more complicated to configure. In the previous writing, I did not include anything about how to auto-enable the service because I think you are able to find documentation for the service management system of your choice. Now I am able to let my computer shut down when the UPS has only 20% power. My problem now is that I don’t have any method to restart the machine because basically a USB cable cannot do this. Maybe I will later try a Raspberry Pi so that I can have this low-powered computer powered by the UPS as well and use that to send a signal to the workstation when the mains power comes back. Therefore, good luck and enjoy.