NUT Default Behavior
-
Hey all,
Just saw that NUT was made available in 2.3 the other day, and installed it the other night. Works beautifully on my APC Smart UPS SUA750, which I actually wasn't sure it would, because the SmartUPS series has a red/single star rating on the NUT webpage. (I thought I would need APCUPSd).
I had hoped to get it to work using the proprietary"Smart" APC serial cable, as I have greater faith in serial connection stability than I do USB, but in the end I just couldn't get that to work. I suspect that this is not a NUT implementation issue, but rather the serial I/O chip on my board and pfSense don't necessarily get along.
Anyway, it's working, but I'm not quite sure what it's doing in its default configuration. In APCUPSd I needed to edit the config file in order to specify all sorts of behaviors, like what triggers a shutdown (percent battery left, estimated battery time left, etc. etc.) but I don't see any of this in NUT.
So, can anyone speak to what the default behavior is? I've read some of the NUT documentation, but I couldn't quite figure it out from that.
If I run a "upsc" command from the shell I get this:
# upsc APC_SUA750 battery.charge: 100 battery.charge.low: 10 battery.charge.warning: 50 battery.mfr.date: 2009/09/15 battery.runtime: 5580 battery.runtime.low: 120 battery.temperature: 29.7 battery.type: PbAc battery.voltage: 27.5 battery.voltage.nominal: 24.0 device.mfr: American Power Conversion device.model: Smart-UPS 750 device.serial: AS0938330724 device.type: ups driver.name: usbhid-ups driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.parameter.synchronous: no driver.version: 2.7.3 driver.version.data: APC HID 0.95 driver.version.internal: 0.39 input.sensitivity: high input.transfer.high: 127 input.transfer.low: 106 input.voltage: 120.2 output.current: 0.45 output.frequency: 60.0 output.voltage: 120.2 output.voltage.nominal: 120.0 ups.beeper.status: enabled ups.delay.shutdown: 20 ups.delay.start: 30 ups.firmware: 651.18.D ups.firmware.aux: 7.4 ups.load: 10.4 ups.mfr: American Power Conversion ups.mfr.date: 2009/09/15 ups.model: Smart-UPS 750 ups.productid: 0002 ups.serial: AS0938330724 ups.status: OL ups.test.result: No test initiated ups.timer.reboot: -1 ups.timer.shutdown: -1 ups.timer.start: -1 ups.vendorid: 051d
Does this mean that by default it will start sending out warning messages at the 50% battery level (presumably to console) and will initiate shutdown at 10% left?
OR, is it instead based on the runtime value? I am guessing that is expressed in seconds (based on what is displayed in the status page widget). Will it initiate shutdown at 120s remaining then?
Which is it? because 10% remaining battery is significantly higher than 120s remaining. or is it whichever is hit first?
This is a fairly reasonable default, if that is what it does.
Anyway, I'd appreciate any clarification!
–Matt
-
See #22 and #23 - http://networkupstools.org/docs/FAQ.html
(I should probably copy it here, just to be a complete reply)
22. How can I make upsmon shut down my system after some fixed interval?
You probably don’t want to do this, since it doesn’t maximize your runtime on battery. Assuming you have a good reason for it (see the next entry), then look at scheduling.txt or the upssched(8) man page for some ideas.
23. Why doesn’t upsmon shut down my system? I pulled the plug and nothing happened.
Wait. upsmon doesn’t consider a UPS to be critical until it’s both on battery and low battery at the same time. This is by design. Nearly every UPS supports the notion of detecting the low battery all by itself. When the voltage drops below a certain point, it will let you know about it.
If your system has a really complicated shutdown procedure, you might need to shut down before the UPS raises the low battery flag. For most users, however, the default behavior is adequate.
Ask yourself this: why buy a nice big UPS with the matching battery and corresponding runtime and then shutdown early? If anything, I’d rather have a few more minutes running on battery during which the power might return. Once the power’s back, it’s business as usual with no visible interruption in service.
If you purposely shut down early, you guarantee an interruption in service by bringing down the box.
See upssched.txt for information on how you can shutdown early if this is what you really want to do.