Discussion of this wiki can be found here
Powerware 5110 UPS monitoring/auto shutdown in Ubuntu 12.04 Precise
NOTE: I take no responsibility if you stuff something up doing this. So long as you have a moderate grasp of Ubuntu/Linux and editing configuration files - then this guide will be very straightforward. Make sure you read carefully and take things slowly. I'm going to skip the small talk - you can read over that here (where I stole the commands from): http://blog.shadypixel.com/monitorin...-ubuntu-linux/That out of the way - here's everything you need to do to get your Powerware 5110 UPS up and running/able to be monitored in Ubuntu 10.04 Lucid.
Note: Updated this guide to read for Ubuntu 12.04 as I just tested it and it works fine!
- Also note that if you are dual booting with Windows7 or Windows Vista, I believe there is some kind of driver bug whereby your PC may shut down upon Windows startup with the 5110 plugged in via USB. There is however a firmware update available from Eaton- or if you recently bought the UPS you should be OK (check the USB F/W version on the side of it, so long as it is higher than 0.5 you should be fine). Now, onto the guide...
Installing
sudo apt-get install nut
Editing ups.conf
gksudo gedit /etc/nut/ups.conf
Add and save.
[Powerware5110] driver = bcmxcp_usb port = auto
gksudo gedit /etc/udev/rules.d/99_nut-serialups.rules
Add and save.
KERNEL=="ttyS0", GROUP="nut"
Start
$ sudo udevadm control --reload-rules $ sudo udevadm trigger $ sudo upsdrvctl start
This should output...
Network UPS Tools - UPS driver controller 2.4.3 Network UPS Tools - BCMXCP UPS driver 0.23 (2.4.3) USB communication subdriver 0.18
Further .conf file editing.
gksudo gedit /etc/nut/upsd.conf
Add and save.
ACL all 0.0.0.0/0 ACL localhost 127.0.0.1/32 ACCEPT localhost REJECT all
gksudo gedit /etc/nut/upsd.users
Add and save.
[local_mon] password = __YOUR_PASSWORD_HERE__ allowfrom = localhost upsmon master
gksudo gedit /etc/nut/upsmon.conf
Add and save.
MONITOR Powerware5110@localhost 1 local_mon __YOUR_PASSWORD_HERE__ master POWERDOWNFLAG /etc/killpower SHUTDOWNCMD "/sbin/shutdown -h now"
Chown and chmod
sudo chown root:nut /etc/nut/* sudo chmod 640 /etc/nut/*
Final .conf edit and Start
gksudo gedit /etc/default/nut
Add and save.
START_UPSD=yes START_UPSMON=yes
gksudo gedit /etc/nut/nut.conf
Add and save.
MODE=standalone
Start nut
sudo /etc/init.d/nut start
sudo upsc Powerware5110
Should show the following
ambient.temperature.high: 1 battery.charge.low: 22 battery.voltage: 26.9 device.mfr: Eaton device.model: POWERWARE UPS 1500i device.serial: device.type: ups driver.name: bcmxcp_usb driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.version: 2.4.3 driver.version.internal: 0.23 input.frequency: 49.9 input.frequency.high: 55 input.frequency.low: 45 input.frequency.nominal: 50 input.transfer.boost.high: 216 input.transfer.high: 280 input.transfer.low: 186 input.transfer.trim.low: 260 input.voltage: 238 input.voltage.nominal: 240 output.current: 0.7 output.current.nominal: 3.8 output.frequency: 49.9 output.phases: 1 output.voltage: 238 output.voltage.nominal: 240 ups.beeper.status: enabled ups.firmware: Cont:00.50 Inve:01.50 ups.load: 18.4 ups.mfr: Eaton ups.model: POWERWARE UPS 1500i ups.power.nominal: 1500 ups.serial: ups.status: OL
Monitoring your UPS from now on.
- Simply run the last command:
sudo upsc Powerware5110
Which will net you the output with all your UPS information. Do with that what you will - feed it into some PHP page with SQL and run LAMP so you can have a live monitor/log of the UPS statistics, output it to a text file, feed it into conky, whatever! This is Linux - your skills are the limit limit
Originally posted The Ubuntu Forums (ubuntuforums.org)