Fedora and UPS monitoring

I recently bought an Eaton 5110 UPS aka Powerware and I wanted to connect this to my ex475 which is now running Fedora.

Install NUT package

[root@cheese ]# yum install nut nut-client
[root@cheese ]# rpm -q nut nut-client
nut-2.6.5-6.fc17.x86_64
nut-client-2.6.5-6.fc17.x86_64

My UPS has a USB connection. Scan USB bus for our UPS and output in ups.conf format this will figure out what driver we need.

[root@cheese ]# nut-scanner -U -N
Cannot load IPMI library (libfreeipmi.so.13) : /lib64/libfreeipmi.so.13: undefined symbol: ipmi_fru_parse_close_device_id. IPMI search disabled.
Scanning USB bus.
[nutdev1]
        driver = "bcmxcp_usb"
        port = "auto"
        vendorid = "0592"
        productid = "0002"
        product = "Powerware UPS"
        vendor = "Powerware"
        bus = "002"
[root@cheese ups]#

Place first two lines into /etc/ups/ups.conf file. We'll call our UPS “mouse”

If you copy the above verbatim upsd won't start up as the driver bcmxcp_usb does not like all these extra keywords being supplied, even thou nut-scanner output them.

[mouse]
        driver = "bcmxcp_usb"
        port = "auto"
        desc = "Eaton 5110"

Edit /etc/ups/upsd.users

[nutmon]
        password = admin
        actions = SET
        instcmds = ALL
        upsmon master

Edit /etc/ups/upsmon.conf

MONITOR mouse@localhost 1 nutmon admin master

Enable the service and start is up

[root@cheese ups]# systemctl enable nut-monitor.service
ln -s '/usr/lib/systemd/system/nut-monitor.service' '/etc/systemd/system/multi-user.target.wants/nut-monitor.service'

[root@cheese ups]# systemctl start nut-monitor.service
[root@cheese ups]# systemctl status nut-monitor.service

Query the UPS

[root@cheese ups]# upsc mouse
battery.charge.low: 11
battery.voltage:  13.5
device.mfr: Eaton
device.model: POWERWARE UPS    500i
device.serial:
device.type: ups
driver.name: bcmxcp_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.6.5
driver.version.internal: 0.26
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: 242
input.voltage.nominal: 240
output.current:   0.1
output.current.nominal:   1.3
output.frequency:  49.9
output.phases: 1
output.voltage: 242
output.voltage.nominal: 240
ups.beeper.status: enabled
ups.firmware: Cont:00.50 Inve:01.50
ups.load:   7.7
ups.mfr: Eaton
ups.model: POWERWARE UPS    500i
ups.power.nominal: 500
ups.serial:
ups.status: OL
ups.test.result: Done and passed

Something that I needed to address.

[root@cheese ups]# upsdrvctl start
Network UPS Tools - UPS driver controller 2.6.5
Network UPS Tools - BCMXCP UPS driver 0.26 (2.6.5)
USB communication subdriver 0.21
Shutdown delay longer than battery capacity when Low Battery warning is given. (max 60 seconds)

reference: