Mar 7, 04:49 PM
Category  

The UPS in question: a F6B\C900-UNV.

I used to use the Bulldog Plus (3.01.18) software, but since my upgrade of this particular machine to Debian Lenny, the upsd process started taking up 30% CPU all the time.

Getting it to work with nut is easy! You just need the magic.

Step 1: install nut.

sudo aptitude install nut

Step 2: Copy and rename (remove .sample) the files in /usr/share/doc/nut/examples/ to /etc/nut. Edit ups.conf.

[bail-ups]
        driver = belkinunv
        port = /dev/ttyS1

The name in []s can be anything; the port is which serial port it’s plugged into, of course.

Edit upsd.users (change passwords as desired):

       # Supervision user
[admin]
                password = mypass
                allowfrom = localhost
                actions = SET
                instcmds = ALL

         # Protection user
[monuser]
                password  = mypass
                allowfrom = localhost
                upsmon master

Edit upsmon.conf. There are many options here, the only necessary one is the MONITOR line. Use the password and name you set earlier:

MONITOR bail-ups@localhost 1 monuser mypass master

Step 3 important: add nut to the group that owns /dev/ttyS1. This is what I missed the first time I tried to do this.

sudo useradd nut dialout

Step 4: (re)Start nut:

/etc/init.d/nut restart

Step 5: Test with upsc:

alucard@organa:/etc/nut$ upsc bail-ups@localhost
battery.charge: 100
battery.voltage: 27.3
battery.voltage.nominal: 24
driver.name: belkinunv
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyS1
driver.version: 2.2.2
driver.version.internal: 0.06
input.frequency: 60.1
input.frequency.nominal: 60
input.voltage: 118.6
input.voltage.maximum: 118.9
input.voltage.minimum: 114.9
input.voltage.nominal: 120
output.frequency: 60.1
output.voltage: 118.2
ups.beeper.status: enabled
ups.delay.restart: 0
ups.delay.shutdown: 0
ups.firmware: 1
ups.load: 17
ups.model: F6B\C900-UNV-xx
ups.power.nominal: 900
ups.status: OL CHRG
ups.test.result: test passed
ups.type: OFFLINE

And, done.

Comment

Commenting is closed for this article.