Factsheet
Arnaud Quette
Arjen de Korte
Charles Lepple
Numerous contributors (..)
Arnaud Quette
Arjen de Korte
Charles Lepple
Numerous contributors (..)
Lately I have been playing a lot with UPS devices. Both using NUT and APCUPSD, but also trying to do my own work.
The result of some personal experimentation was my own tool called sups (simple ups)
Using it is as simple as extracting the executable (ideally somewhere in your path) and then running it like
sudo ./sups
sudo is probably required because more than likely the dev file is owned by root
The application looks on its own for HID compatible devices under /dev and tries to connect to the first one that it finds.
You can define your own device using the --port argument
sudo ./sups --port /dev/usb/hiddev1
If you want to shutdown the local machine below a certain battery level, you can use the --monitoring argument. The default threshold is 50% as this is the minimum safe level for cheap lead acid batteries. But you can also define your own threshold using the argument --threshold and passing the percentage. Like
sudo sups --monitoring --threshold 30
There is no daemon or service mode, so for automated shutdown the application has to be run through root's cron using something like
* * * * * sups --monitoring --threshold 45
The application does not support any low level communication with the device drivers. This was a deliberate choice. It restricts communication with fancy UPS functions, but also allows the application to be written in a higher level language that is easier to follow and maintain.
So far the app is only tested with only a few UPS devices that I have access to
So I would appreciate any feedback or corrections
You can use the --debug argument to see more information about what data was received from the device and how it was parsed.
The reasoning behind the app was to create a tool that is functionally complete but simple to use with 0 configuration even with multiple UPS devices, while at the same time being easy to maintain.
You can find the code and the executable, along with detailed instructions about the application and HID in general, under the github repo
https://github.com/kastaniotis/Sups
APC UPS Monitoring Software - Linux & Unix
What software are people using to monitor, configure, etc their UPS'?
sups - Simple UPS tool for linux
PSA: APC has updated it's terms for the PowerChute management software. It now requires a licence
Videos
It might not be the right solution for your situation (NUT as mentioned by the other answer is right for you), but a common solution for *nix system is apcupsd. It links to most UPSs (they have a list) and will do remote communication (to shutdown multiple systems connected to the same power source). Also, several big server equipment brands are actually rebadged APC units (such as HP UPSs).
The only way I know of doing this is Network UPS Tools - http://www.networkupstools.org/ as you mentioned but I don't really know much about *nix/bsd so there may be others. NUT does the job and is compatible with some Eaton units.
Although I've also read people mentioning using a windows machine plugged into the ups to inform *nix boxes they should shut down but I wouldn't know where to start on that.

