[Nut-upsuser] APC Smart-UPS 1000

Kevin bakdong at gmail.com
Sat Jan 22 06:39:33 UTC 2011


Arjen de Korte <nut+users <at> de-korte.org> writes:

> 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.

Here is the output:

# ./clients/upscmd -u apcmon -p pass123 apc1500 shutdown.return
OK

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:-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:87 START:247
delay.start:250 delay.shutdown:1 REBOOT:-1 SHUT:87 START:247
delay.start:250 delay.shutdown:1 REBOOT:-1 SHUT:85 START:245

Some seconds later...

# ./clients/upsc apc1500
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.mfr.date: 2007/07/07
battery.runtime: 5880
battery.runtime.low: 120
battery.temperature: 32.4
battery.type: PbAc
battery.voltage: 27.4
battery.voltage.nominal: 24.0
device.mfr: American Power Conversion
device.model: Smart-UPS 1000
device.serial: AS0727233122
device.type: ups
driver.name: usbhid-ups
driver.parameter.offdelay: 1
driver.parameter.ondelay: 250
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.6.0
driver.version.data: APC HID 0.95
driver.version.internal: 0.35
input.sensitivity: high
input.voltage: 230.4
output.voltage: 230.4
output.voltage.nominal: 230.0
ups.beeper.status: disabled
ups.delay.shutdown: 1
ups.delay.start: 250
ups.firmware: 652.13.I
ups.firmware.aux: 7.3
ups.load: 5.8
ups.mfr: American Power Conversion
ups.mfr.date: 2007/07/07
ups.model: Smart-UPS 1000
ups.productid: 0002
ups.serial: AS0727233122
ups.status: OL
ups.test.result: No test initiated
ups.timer.reboot: -1
ups.timer.shutdown: 17
ups.timer.start: 177
ups.vendorid: 051d


Contents of apc-hid.c:

[...]
  { "ups.timer.reboot", 0, 0, "UPS.Output.DelayBeforeReboot", NULL, "%.0f", 
HU_FLAG_QUICK_POLL, NULL},
  /* used by APC BackUPS ES */
  { "ups.delay.start", ST_FLAG_RW | ST_FLAG_STRING, 10, 
"UPS.APCGeneralCollection.APCDelayBeforeStartup", NULL, DEFAULT_ONDELAY, 
HU_FLAG_ABSENT, NULL},
  { "ups.delay.shutdown", ST_FLAG_RW | ST_FLAG_STRING, 10, 
"UPS.APCGeneralCollection.APCDelayBeforeShutdown", NULL, DEFAULT_OFFDELAY, 
HU_FLAG_ABSENT, NULL},
  { "ups.timer.start", 0, 0, "UPS.APCGeneralCollection.APCDelayBeforeStartup", 
NULL, "%.0f", HU_FLAG_QUICK_POLL, NULL},
  { "ups.timer.shutdown", 0, 0, 
"UPS.APCGeneralCollection.APCDelayBeforeShutdown", NULL, "%.0f", 
HU_FLAG_QUICK_POLL, NULL},
  { "ups.timer.reboot", 0, 0, "UPS.APCGeneralCollection.APCDelayBeforeReboot", 
NULL, "%.0f", HU_FLAG_QUICK_POLL, NULL},
[...]


I am not seeing any difference.

> > 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.

That's understood, I'd have to do some more testing to try to reproduce this.


> > 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.

Ok, and thanks for your efforts. Actually, as I have a working solution on the 
Smart-UPS 1000, and not on the CS 500, it is the latter that is more critical 
(as I'm currently on standby all the time for when the power goes down!)

Regards,
Kevin.




More information about the Nut-upsuser mailing list