Re: [Nut-upsuser] Things seem to be working but upscmd does nothing

2010-12-15 Thread Arjen de Korte

Citeren Richard richard-...@rain4us.net:

The nut ups daemons seem to be communicating with the UPS but upscmd  
gives me no joy.   Running commands do nothing and produce no output.


This is something that needs fixing in 'upscmd'. It erroneously  
doesn't print the server response after sending off a command, which  
is very confusing. I already fixed this in the development version a  
couple of minutes ago.


Using the web interface returns an authentication failure and that  
is the only clue I  have.  I believe I have everything setup  
correctly but it's not working.  Can someone review this and give me  
clues as to what I should research next?


ups.conf
[Hagrid]
driver = usbhid-ups
port = /dev/apcusb
product = Smart-UPS 2200 XL FW:690.19.D USB FW:7.4
serial = JS1005032730
desc = Primary 2200XL with huge battery pack - the big guy


Looks good.


upsmon.conf
MONITOR hag...@localhost 1 nutmon easy  master


Fine.


upsd.users
[nutmon]
password = easy
nutmon master   # or upsmon slave



If this is all there is in this file, you've missed setting up the  
permitted instcmds and actions for this user. See 'man 5 upsd.users'  
for an explanation. Failing to set this up, will default to not  
allowing instcmds and variable settings at all.


Best regards, Arjen
--
Please keep list traffic on the list (off-list replies will be rejected)


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Setting Battery Runtime Low

2010-12-15 Thread Arjen de Korte

Citeren Poulton, Stuart W.L. sw...@leicester.ac.uk:


rcs-manage-1:/var/log # upsrw  phys-eaton
[battery.runtime.low]
Remaining battery runtime when UPS switches to LB (seconds)
Type: UNKNOWN (unrecognized)


The definition in the MIB to NUT mapping is lacking a type for this  
variable. Clients expect it to be either a string or an enumerated  
value and the driver doesn't report either. This needs to be fixed in  
the driver, there is no workaround.



I suspect from this that it may not be configurable.


Maybe, but until this is fixed in the driver it's a driver bug. Note  
that the snmp-ups driver is currently in dire need of an active  
developer taking over the maintenance. Since I don't have a SNMP  
capable UPS, I can't really work on it other than the occasional fix  
for an obvious problem.


Best regards, Arjen
--
Please keep list traffic on the list (off-list replies will be rejected)


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


[Nut-upsuser] CyberPower Value 2200E-GP

2010-12-15 Thread David Varley
I've just set up a CyberPower Value 2200E-GP on a system running Lucid
AMD64, with the current NUT package via apt-get, and it seems to be working
fine for me with the usbhid-ups driver, so I guess it can go in the HCL?

I'm using the system to host several virtual servers under KVM, and to make
things simple I set it up to hibernate rather than shutdown, that way all
the guest OS don't have to be shutdown, they just carry on happily from
where they were after power is restored. To achieve this I timed how long it
take to go into hibernation (30-40 seconds), and set the UPS to shutdown
after 60 seconds via the driver offdelay setting.
I then set:

SHUTDOWNCMD /sbin/upsdrvctl shutdown;/usr/sbin/pm-hibernate

and under test it works well. I'm don't know if there is a better or right
way to do this, obviously the heuristically determined off delay is a bit of
a risk, and as the system doesn't actually shut down perhaps there will be
other problems with NUT? The /etc/killpower flag isn't deleted, for
instance.

I've attached the output of  *usbhid-ups -DDD -a 2200LCD* as there seem to
be several errors reported in there. I can see the subdriver doesn't find
the serial number, for example, while the pwrstat code supplied by
CyberPower does.

Cheers,

David
Results for CyberPower Value 2200E-GP
(Their pwrstat utility reports Serial: BFF7104#7N5)

sudo /lib/nut/usbhid-ups -DDD -a 2200LCD
Network UPS Tools - Generic HID driver 0.34 (2.4.3)
USB communication driver 0.31
   0.00 debug level is '3'
   0.001882 upsdrv_initups...
   0.221831 Checking device (1D6B/0001) (005/001)
   0.221884 - VendorID: 1d6b
   0.221891 - ProductID: 0001
   0.221897 - Manufacturer: Linux 2.6.32-26-server uhci_hcd
   0.221903 - Product: UHCI Host Controller
   0.221909 - Serial Number: :00:1d.3
   0.221915 - Bus: 005
   0.221920 Trying to match device
   0.221937 Device does not match - skipping
   0.221948 Checking device (0764/0501) (004/015)
   0.243852 - VendorID: 0764
   0.243865 - ProductID: 0501
   0.243871 - Manufacturer: CPS
   0.243877 - Product:  Value 2200E
   0.243883 - Serial Number: unknown
   0.243888 - Bus: 004
   0.243893 Trying to match device
   0.243960 Device matches
   0.243984 failed to claim USB device: could not claim interface 0: Device 
or resource busy
   0.246013 detached kernel driver from USB device...
   0.253853 HID descriptor, method 1: (9 bytes) = 09 21 10 01 21 01 22 8b 
01
   0.253870 HID descriptor, method 2: (9 bytes) = 09 21 10 01 21 01 22 8b 
01
   0.253876 HID descriptor length 395
   0.306863 Report Descriptor size = 395
   0.306885 Report Descriptor: (395 bytes) = 05 84 09 04 a1 01 09 24 a1 00 
85 01 09 fe
   0.306896  75 08 95 01 15 00 26 ff 00 b1 22 85 02 09 ff b1 22 85 03 05 85 
09 89 b1 22
   0.306907  85 04 09 8f b1 22 85 05 09 8b b1 22 85 06 09 2c b1 22 85 07 75 
08 95 06 25
   0.306918  78 09 83 09 8d 09 8e 09 8c 09 29 09 67 b1 22 85 08 75 08 95 01 
65 00 09 66
   0.306929  81 a2 09 66 b1 a2 09 68 75 10 27 ff ff 00 00 66 01 10 81 a2 09 
68 b1 a2 09
   0.306940  2a 26 58 02 81 a2 09 2a b1 a2 85 09 75 08 26 ff 00 05 84 09 40 
67 21 d1 f0
   0.306951  00 55 06 b1 22 85 0a 09 30 b1 a2 65 00 55 00 09 02 a1 02 85 0b 
75 01 95 06
   0.306962  25 01 05 85 09 d0 09 44 09 45 09 42 09 46 09 43 81 a2 09 d0 09 
44 09 45 09
   0.306973  42 09 46 09 43 b1 a2 75 02 95 01 81 01 b1 01 c0 85 0c 05 84 09 
5a 75 08 15
   0.306984  01 25 03 b1 a2 85 0d 09 fd 15 00 26 ff 00 b1 22 c0 05 84 09 1a 
a1 00 85 0e
   0.306995  05 84 09 40 75 08 67 21 d1 f0 00 55 07 b1 22 85 0f 75 10 26 07 
01 09 30 b1
   0.307006  a2 85 10 09 53 75 08 15 a0 25 a0 b1 22 75 10 09 54 16 07 01 26 
07 01 b1 22
   0.307016  c0 09 1c a1 00 85 12 09 30 15 00 b1 a2 75 08 65 00 55 00 85 13 
09 35 b1 a2
   0.307027  85 14 09 58 25 06 b1 a2 85 15 09 57 75 10 15 ff 26 ff 7f 35 c4 
47 c4 ff 1d
   0.307038  00 66 01 10 b1 a2 85 16 09 56 b1 a2 85 17 09 6e 75 01 15 00 25 
01 35 00 45
   0.307048  00 65 00 b1 a2 09 65 b1 a2 75 06 b1 01 85 18 75 10 09 44 26 c2 
01 66 21 d1
   0.307056  55 07 b1 a2 c0 c0
   0.307133 Using subdriver: CyberPower HID 0.3
   0.310846 refresh_report_buffer: expected 2 bytes, but got 8 instead
   0.310858 Report[err]: (8 bytes) = 01 01 98 0d 2c 01 64 00
   0.310870 Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x01, 
Offset: 0, Size: 8, Value: 1.00
   0.314846 refresh_report_buffer: expected 2 bytes, but got 8 instead
   0.314859 Report[err]: (8 bytes) = 02 02 98 0d 2c 01 64 00
   0.314869 Path: UPS.PowerSummary.iSerialNumber, Type: Feature, ReportID: 
0x02, Offset: 0, Size: 8, Value: 2.00
   0.318844 refresh_report_buffer: expected 2 bytes, but got 8 instead
   0.318856 Report[err]: (8 bytes) = 03 04 98 0d 2c 01 64 00
   0.318866 Path: UPS.PowerSummary.iDeviceChemistry, Type: