[Nut-upsuser] APC Smart-UPS 1000

Arjen de Korte nut+users at de-korte.org
Fri Jan 21 09:11:07 UTC 2011


Citeren Kevin <bakdong op gmail.com>:

> [apc1500]
>         driver=usbhid-ups
>         port=auto
>         ondelay=200
>         offdelay=1

Yes.

> After restarting the driver, and running shutdown.return, the timers  
> are set to
> 90 and 200. (the values of ups.delay.shutdown and ups.delay.start)
>
> REBOOT:-1 SHUT:-1 START:-1
> REBOOT:-1 SHUT:-1 START:-1
> REBOOT:-1 SHUT:89 START:199
> REBOOT:-1 SHUT:89 START:199
> REBOOT:-1 SHUT:89 START:199
> REBOOT:-1 SHUT:85 START:195
> REBOOT:-1 SHUT:85 START:195
> REBOOT:-1 SHUT:83 START:193
> REBOOT:-1 SHUT:83 START:193
>
> Using values of 250 and 1 gives:
>
> delay.start:250 delay.shutdown:1 REBOOT:-1 SHUT:-1 START:-1
> delay.start:250 delay.shutdown:1 REBOOT:-1 SHUT:-1 START:-1
> delay.start:250 delay.shutdown:1 REBOOT:-1 SHUT:89 START:249
> delay.start:250 delay.shutdown:1 REBOOT:-1 SHUT:89 START:249
> delay.start:250 delay.shutdown:1 REBOOT:-1 SHUT:89 START:249
> delay.start:250 delay.shutdown:1 REBOOT:-1 SHUT:86 START:246
> delay.start:250 delay.shutdown:1 REBOOT:-1 SHUT:86 START:246
> delay.start:250 delay.shutdown:1 REBOOT:-1 SHUT:84 START:244
> delay.start:250 delay.shutdown:1 REBOOT:-1 SHUT:84 START:244

This looks actually pretty promising. It looks like the UPS sets a  
lower limit to the shutdown timer. I would not be surprised if this is  
caused by the value that is set in the  
"UPS.Output.APCShutdownAfterDelay" HID path, which is currently set at  
"90".

Could you try the attached patch on the nut-2.6.0 sources, compile it  
again and run the driver again? If all is well, I expect the  
'ups.delay.shutdown' to be a modifiable value after that. You could  
try if setting it to "20" works. If the above is the case, I expect  
there might be a mapping for the 'ups.delay.start' and  
'ups.delay.reboot' as well.

If the variable seems to be modifiable, try to run 'shutdown.return'  
again while logging as the above.

[...]

> Ok, this makes sense now. The Smart-UPS 1000 apparently has some  
> variations on the 'standard'.

Well, it is not the only UPS (nor vendor) that has. These so called  
vendor specific HID paths are allowed by the PDC standard. The problem  
is that every vendor can choose what to put in them. So you can't  
refer to a standard to find the meaning of them. This is not a problem  
if we have full access to the specifications (like Eaton for  
instance). But if the vendor is not willing to share them with us  
(like APC for instance), we need to reverse engineer them. The latter  
is a long, tedious process, which requires lots of help from owners of  
these devices.

[...]

> Isn't putting the UPS to sleep the desired behaviour here, so that  
> it wakes up again when power returns?

It should wakeup if the power returns after a power outage. But if the  
power happens to return between the moment NUT sees the battery is low  
(and initiates the shutdown sequence on the server) and the moment it  
sends the shutdown signal to the UPS, it should rather cycle the  
outlet to prevent what is known as a power race (see the documentation  
for more information). You don't want to see the happening when you're  
not around to restart your servers by hand.

[...]

> On the CS 500, the shutdown timer is the only one that changes at all. The
> reboot and start timers stay at zero (not -1) all the time.

I guess this means that the existing mapping might be wrong. I suspect  
that it only has 'shutdown.reboot' and that the other mappings allow  
setting the delay values. Note that in the CS 500 these are all vendor  
specific HID paths. I'll deal with that, after we fully understand the  
operation on the Smart-UPS 1000.

Best regards, Arjen
-- 
Please keep list traffic on the list (off-list replies will be rejected)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: apc-hid.c.diff
Type: text/x-patch
Size: 959 bytes
Desc: niet beschikbaar
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20110121/11851e18/attachment.bin>


More information about the Nut-upsuser mailing list