[Nut-upsuser] NOTIFYCMD and SHUTDOWNCMD do not work until Nut is restarted
Julien Métairie
ruliane at ruliane.net
Tue Apr 16 13:26:45 UTC 2013
Hello,
-------- Message original --------
Sujet: Re: [Nut-upsuser] NOTIFYCMD and SHUTDOWNCMD do not work until Nut
is restarted
De : Julien Métairie <ruliane at ruliane.net>
Pour : NUT Users <nut-upsuser at lists.alioth.debian.org>
Date : 12/04/2013 18:28
> Hi,
>
> -------- Message original --------
> Sujet: Re: [Nut-upsuser] NOTIFYCMD and SHUTDOWNCMD do not work until Nut
> is restarted
> De : Arnaud Quette <aquette.dev at gmail.com>
> Pour : Julien Métairie <ruliane at ruliane.net>
> Copie à : NUT Users <nut-upsuser at lists.alioth.debian.org>
> Date : 11/04/2013 22:33
>
>> bonjour Julien
>>
>> 2013/4/11 Julien Métairie <ruliane at ruliane.net
>> <mailto:ruliane at ruliane.net>>
>>
>> Hi everybody,
>>
>> I installed and configured Nut 2.4.3 on Debian Squeeze, using
>> package. It monitors an MGE Pulsar 1500 UPS in standalone mode.
>>
>> Here are parts of upsmon.conf :
>> SHUTDOWNCMD "/bin/bash /root/extinction.sh >> /var/log/ups/ups.log
>> 2>>&1"
>> NOTIFYCMD "/bin/bash /usr/sbin/alerte.sh"
>> [...]
>> NOTIFYFLAG ONBATT SYSLOG+EXEC
>>
>> At startup, driver, upsd and upsmon start but when I pull off the
>> line, a message is appended to syslog but no script is executed, nor
>> SHUTDOWNCMD is called. To make things better, I must restart Nut :
>> invoke-rc.d nut restart
>>
>> Trying to understand this behavior, i noticed the following lines in
>> syslog at computer startup, pasted there[1] for convenience :
>>
>> usb 3-1: New USB device found, idVendor=0463, idProduct=ffff
>> usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=4
>> usb 3-1: Product: Pulsar
>> usb 3-1: Manufacturer: MGE UPS SYSTEMS
>> usb 3-1: SerialNumber: 1Y3H34201
>> usb 3-1: configuration #1 chosen from 1 choice
>> [...]
>>
>> /build/buildd-linux-2.6_2.6.__32-48squeeze1-i386-F95osd/__linux-2.6-2.6.32/debian/build/__source_i386_none/drivers/hid/__usbhid/hid-core.c:
>>
>> usb_submit_urb(ctrl) failed
>> generic-usb 0003:0463:FFFF.0001: timeout initializing reports
>> generic-usb 0003:0463:FFFF.0001: hiddev0,hidraw0: USB HID v1.10
>> Device [MGE UPS SYSTEMS Pulsar] on usb-0000:00:0a.1-1/input0
>> usbcore: registered new interface driver usbhid
>> usbhid: v2.6:USB HID core driver
>>
>> May the failure be linked to my issue ? What can I do to make Nut
>> work as soon as my computer boots up ?
>>
>>
>> maybe.
>> can you reproduce this easily?
>> if so, what the result of "upsc <devname>":
>> 1) just after the boot?
>> 2) then, when you've pulled the line?
>>
>> Arnaud
>> cheers,
>> --
>> NUT (Network UPS Tools) Project Leader - http://www.networkupstools.org
>> Debian Developer - http://www.debian.org
>> Free Software Developer - http://arnaud.quette.fr
>>
>
> I can reproduce it ; here [1] is the output :
> At startup :
>
> ruliane at physrv01:~$ upsc onduleur
> battery.capacity: 9.00
> battery.charge: 100
> battery.charge.low: 50
> battery.charge.restart: 0
> battery.energysave: yes
> battery.protection: yes
> battery.runtime: 1962
> battery.type: PbAc
> device.mfr: MGE UPS SYSTEMS
> device.model: Pulsar 1500
> device.serial: 1Y3H34201
> device.type: ups
> driver.name: usbhid-ups
> driver.parameter.pollfreq: 30
> driver.parameter.pollinterval: 2
> driver.parameter.port: /dev/usb/hiddev0
> driver.version: 2.4.3
> driver.version.data: MGE HID 1.18
> driver.version.internal: 0.34
> input.bypass.current: 0.00
> input.bypass.voltage: 232.0
> input.frequency: 49.0
> input.frequency.nominal: 50
> input.voltage: 232.0
> input.voltage.nominal: 230
> outlet.1.autoswitch.charge.low: 0
> outlet.1.delay.shutdown: 2592000
> outlet.1.delay.start: 3
> outlet.1.desc: PowerShare Outlet 1
> outlet.1.id: 1
> outlet.1.status: on
> outlet.1.switchable: yes
> outlet.2.autoswitch.charge.low: 0
> outlet.2.delay.shutdown: 2592000
> outlet.2.delay.start: 6
> outlet.2.desc: PowerShare Outlet 2
> outlet.2.id: 2
> outlet.2.status: on
> outlet.2.switchable: yes
> outlet.desc: Main Outlet
> outlet.id: 0
> outlet.switchable: yes
> output.current: 1.30
> output.frequency: 49.0
> output.frequency.nominal: 50
> output.powerfactor: 0.76
> output.voltage: 41216.0
> output.voltage.nominal: 230
> ups.beeper.status: enabled
> ups.delay.shutdown: 20
> ups.delay.start: 30
> ups.firmware: 01
> ups.load: 19
> ups.load.high: 102
> ups.mfr: MGE UPS SYSTEMS
> ups.model: Pulsar 1500
> ups.power: 294
> ups.power.nominal: 1500
> ups.productid: ffff
> ups.realpower: 223
> ups.realpower.nominal: 1350
> ups.serial: 1Y3H34201
> ups.start.auto: yes
> ups.start.battery: no
> ups.start.reboot: yes
> ups.status: OL CHRG
> ups.test.interval: 604800
> ups.test.result: Done and passed
> ups.timer.shutdown: -1
> ups.timer.start: -1
> ups.type: online
> ups.vendorid: 0463
>
> [Unplugged]
>
> ruliane at physrv01:~$ upsc onduleur
> battery.capacity: 9.00
> battery.charge: 99
> battery.charge.low: 50
> battery.charge.restart: 0
> battery.energysave: yes
> battery.protection: yes
> battery.runtime: 2033
> battery.type: PbAc
> device.mfr: MGE UPS SYSTEMS
> device.model: Pulsar 1500
> device.serial: 1Y3H34201
> device.type: ups
> driver.name: usbhid-ups
> driver.parameter.pollfreq: 30
> driver.parameter.pollinterval: 2
> driver.parameter.port: /dev/usb/hiddev0
> driver.version: 2.4.3
> driver.version.data: MGE HID 1.18
> driver.version.internal: 0.34
> input.bypass.current: 0.00
> input.bypass.voltage: 234.0
> input.frequency: 49.0
> input.frequency.nominal: 50
> input.transfer.reason: input voltage out of range
> input.voltage: 234.0
> input.voltage.nominal: 230
> outlet.1.autoswitch.charge.low: 0
> outlet.1.delay.shutdown: 2592000
> outlet.1.delay.start: 3
> outlet.1.desc: PowerShare Outlet 1
> outlet.1.id: 1
> outlet.1.status: on
> outlet.1.switchable: yes
> outlet.2.autoswitch.charge.low: 0
> outlet.2.delay.shutdown: 2592000
> outlet.2.delay.start: 6
> outlet.2.desc: PowerShare Outlet 2
> outlet.2.id: 2
> outlet.2.status: on
> outlet.2.switchable: yes
> outlet.desc: Main Outlet
> outlet.id: 0
> outlet.switchable: yes
> output.current: 1.20
> output.frequency: 49.0
> output.frequency.nominal: 50
> output.powerfactor: 0.74
> output.voltage: 41216.0
> output.voltage.nominal: 230
> ups.beeper.status: enabled
> ups.delay.shutdown: 20
> ups.delay.start: 30
> ups.firmware: 01
> ups.load: 18
> ups.load.high: 102
> ups.mfr: MGE UPS SYSTEMS
> ups.model: Pulsar 1500
> ups.power: 285
> ups.power.nominal: 1500
> ups.productid: ffff
> ups.realpower: 212
> ups.realpower.nominal: 1350
> ups.serial: 1Y3H34201
> ups.start.auto: yes
> ups.start.battery: no
> ups.start.reboot: yes
> ups.status: OB DISCHRG
> ups.test.interval: 604800
> ups.test.result: Done and passed
> ups.timer.shutdown: -1
> ups.timer.start: -1
> ups.type: online
> ups.vendorid: 0463
>
> Do you see something bad ?
>
> Regarding the non-execution of SHUTDOWNCMD, I think I should recalibrate
> the battery. But the non-execution of NOTIFYCMD persists...
>
> Thanks,
> Julien
>
> [1]
> http://paste.leslamas.net/?2391a19dac79d316#LIDvrGEJOGDnh1wgeKzBeL7tTawfP+zC7XLpbXn8gO8=
>
Can someone explain me what the following lines mean ? I don't really
know if they are linked to my problem.
/build/buildd-linux-2.6_2.6.__32-48squeeze1-i386-F95osd/__linux-2.6-2.6.32/debian/build/__source_i386_none/drivers/hid/__usbhid/hid-core.c:
usb_submit_urb(ctrl) failed
generic-usb 0003:0463:FFFF.0001: timeout initializing reports
generic-usb 0003:0463:FFFF.0001: hiddev0,hidraw0: USB HID v1.10
I don't see any strange thing in upsc.
Thanks,
Julien
More information about the Nut-upsuser
mailing list