This page will summarise the usage of the Network UPS Tools (NUT) (http://www.networkupstools.org) on Ubuntu.
The version of Ubuntu being used here is Ubuntu Gutsy Gibbon 7.10 and the version of nut included therein is 2.0.5-3ubuntu1.
The brief dump of notes for setting up a Powerware 5110 is below ready for some fine tuning a little later:
- sudo aptitude install nut nut-usb
- sudo addgroup adminuser nut
- Copy and edit these files from /usr/share/doc/nut/examples/
- Refer to /usr/share/doc/nut/README.Debian.gz
- port = /dev/powerware5110
- Edit the udev rule file /etc/udev/rules.d/025_nut-usbups.rules
- Add this to the end of the powerware line (note the comma!). This creates a specific device symlink.
- , SYMLINK+="powerware5110"
- Create a NOTIFYCMD script
- I installed postfix and set it up as a "satellite" system. I was using ssmtp, however, the from address was incorrect when it was sent by the "nut" user.
echo "$*" | mail -s "[mduserver] UPS Notify" firstname.lastname@example.org
Sorry I know this is not great at this stage but there are a few gotchas that I would like to capture here.
The "port = auto" did not find the correct USB device so the permissions were wrong and nut did not work. This is the main reason for the udev rule so that we can specify the right device accurately.