Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I use nut to monitor my ippon 800 UPS. Everything seems works, except shutdown.

I can get UPS params with upsc command:

~ > upsc ippon-800 
battery.charge: 0
battery.voltage: 12.50
battery.voltage.high: 13.60
battery.voltage.low: 12.60
battery.voltage.nominal: 12.0
beeper.status: enabled
device.type: ups
driver.name: blazer_usb
driver.parameter.offdelay: 6
driver.parameter.ondelay: 7
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.4.3
driver.version.internal: 0.03
input.current.nominal: 3.0
input.frequency: 50.1
input.frequency.nominal: 50
input.voltage: 6.1
input.voltage.fault: 6.1
input.voltage.nominal: 220
output.voltage: 226.9
ups.delay.shutdown: 6
ups.delay.start: 420
ups.load: 6
ups.productid: 0003
ups.status: OB
ups.temperature: 25.0
ups.type: offline / line interactive
ups.vendorid: 06da

Every 5 minutes I get warnings in each terminal if power gone:

Широковещательное сообщение от nut@myhost       
    (somewhere) at 20:45  ..                                               

UPS ippon-800@localhost on battery  

Here is my configs:

~ > cat /etc/nut/ups.conf 
[ippon-800]
  driver = blazer_usb
  port = auto
  desc = "Ippon Back Power Pro 800"
  default.battery.voltage.high = 13.60
  default.battery.voltage.low = 12.60
  offdelay = 6
  ondelay = 7

~ > cat /etc/nut/upsmon.conf |grep -v ^#|sort|uniq

DEADTIME 21
FINALDELAY 5
HOSTSYNC 15
MINSUPPLIES 1
MONITOR ippon-800@localhost 1 nut heh-secret-password master
NOCOMMWARNTIME 300
POLLFREQ 5
POLLFREQALERT 5
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
RUN_AS_USER nut
SHUTDOWNCMD "/sbin/shutdown -h +0"

My UPS just powers off my computer after about 15 minutes of beeping without executing shutdown command. How can I make nut doing shutdown?

Update

set POWERDOWNFLAG /tmp/killpower

share|improve this question
    
nut@myhost and RUN_AS_USER seem to indicate that it's running as user nut and probably does not have privileges to shutdown the computer in your SHUTDOWNCMD. Do a sudo su -l nut -s /bin/bash and try to execute the SHUTDOWNCMD manually - and see what the error is. –  gertvdijk Dec 23 '12 at 17:49
    
According to manual, upsmon service runs as RUN_AS_USER, but SHUTDOWNCMD is being executed by separate process as root. –  zuba Dec 23 '12 at 18:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.