I've got a Proline 650 UPS (Serial) installed
Extra details: The UPS has a serial connection with a single 12v SLA battery. (It was not listed in the NUT compatibility list but after compiling NUT-scanner it was detected to work with the blazer_ser driver. It seems to work perfectly, if I leave ups-monitor running the server will shut itself down automatically when the UPS has been on battery power for 30 seconds or a minute or whatever. OS: Debian 7 Wheezy. Hardware is a single, low power headless i5 server with 1 3.5" HDD.
PROBLEM
The UPS turns itself off after about 5 minutes while the reported battery capacity is still 65% (it is probably under estimating capacity because I've just installed a new battery) and the battery voltage is reported by NUT as 12.1v just before it turns off the load. The UPS turns itself off after about 5 mins regardless of whether its being polled by the server or not and regardless whether there is a light load or no load. (I'm powering the server directly from line power during some of the testing to avoid unexpected power loss when UPS does energy_saving)
I expected with NUT polling the UPS every few seconds for status updates the UPS would realize that there is a computer depending upon it, but the UPS is not clever. The UPS shows the server as drawing 12% of the maximum output capacity, which it seems to consider "no load". After the UPS turns the load off the voltage at the battery terminals (single 12v batt) has a no-load voltage of about 12.6v indicsting it's still almost fully charged.
This self powering off behavior is referred to in the NUT docs as energy_saving (battery.energysave).
The blazer_ser driver doesnt seem to offer a way to disable energy_saving. This seems crazy that there is no way to keep the UPS load output ON. How can a UPS be advertised as providing x amount of power but turns itself off prematurely, with no simple way to correct the behavior in software?
This is my status output
$ upsc nutdev1@127.0.0.1 battery.charge: 100 battery.voltage: 13.60 battery.voltage.high: 13.00 battery.voltage.low: 10.40 battery.voltage.nominal: 12.0 device.type: ups driver.name: blazer_ser driver.parameter.pollinterval: 2 driver.parameter.port: /dev/ttyS0 driver.version: 2.6.4 driver.version.internal: 1.55 input.current.nominal: 3.0 input.frequency: 50.1 input.frequency.nominal: 50 input.voltage: 221.0 input.voltage.fault: 221.0 input.voltage.nominal: 220 output.voltage: 221.0 ups.beeper.status: enabled ups.delay.shutdown: 30 ups.delay.start: 180 ups.load: 12 ups.status: OL ups.temperature: 25.0 ups.type: offline / line interactive
I also ran upsrw -u admin -p mypass -s -l nutdev1
but there was no energysave or similar option. Only stuff like beeper.toggle (tested, working as expected) and other basic stuff.
There was an instant load off option. It works. There was a load on option, I tried calling it repeatedly hoping to delay the energysave countdown but it didnt work. There was also a shutdown disable option, which also did not help.
Any suggestions welcome. I've thought of a few things that I'm not keen on:
- I tried disabling energy saving even though the option is not listed
upscmd -u upsadmin1 -p mypass nutdev1 battery.energysave
Unexpected response from upsd: ERR CMD-NOT-SUPPORTED
- Try other drivers
- Get another UPS (no guarantee of other locally available UPS's working well with NUT)
- Connect up more load (waste electricity) just for the sake of being considered a load
- Hack the UPS electronically to fool it's load detection (time not well spent)
It seems like there HAS to be a simple software solution, thats why I'm asking.
================
As per BillThor's suggestion, I've updated my upsmon.conf file:
$ grep -v '^#' /etc/nut/upsmon.conf MONITOR nutdev1@127.0.0.1 1 foo2 bar2 master MINSUPPLIES 1 SHUTDOWNCMD "/usr/bin/logger fake shutdown" POLLFREQ 5 POLLFREQALERT 5 HOSTSYNC 15 DEADTIME 15 POWERDOWNFLAG /etc/killpower NOTIFYFLAG ONLINE SYSLOG+WALL NOTIFYFLAG ONBATT SYSLOG+WALL NOTIFYFLAG LOWBATT SYSLOG+WALL NOTIFYFLAG FSD SYSLOG+WALL NOTIFYFLAG COMMOK SYSLOG+WALL NOTIFYFLAG COMMBAD SYSLOG+WALL NOTIFYFLAG SHUTDOWN SYSLOG+WALL NOTIFYFLAG REPLBATT SYSLOG+WALL NOTIFYFLAG NOCOMM SYSLOG+WALL NOTIFYFLAG NOPARENT SYSLOG+WALL RBWARNTIME 43200 NOCOMMWARNTIME 300 FINALDELAY 5
I switched the UPS on (with no line power) 3 times back to back without charging. Battery capacity and voltage has not changed. Status LB has never occurred. Here are the syslogs
Dec 2 07:08:00 t upsmon[2000]: Startup successful Dec 2 07:08:00 t upsd[1942]: User monuser1@127.0.0.1 logged into UPS [nutdev1] Dec 2 07:08:30 t upsmon[2002]: UPS nutdev1@127.0.0.1 on battery Dec 2 07:13:34 t blazer_ser[1939]: Communications with UPS lost: status read failed! Dec 2 07:13:36 t upsd[1942]: Data for UPS [nutdev1] is stale - check driver Dec 2 07:13:40 t upsmon[2002]: Poll UPS [nutdev1@127.0.0.1] failed - Data stale Dec 2 07:13:40 t upsmon[2002]: Communications with UPS nutdev1@127.0.0.1 lost Dec 2 07:13:45 t upsmon[2002]: Poll UPS [nutdev1@127.0.0.1] failed - Data stale Dec 2 07:13:50 t upsmon[2002]: Poll UPS [nutdev1@127.0.0.1] failed - Data stale Dec 2 07:13:55 t upsmon[2002]: Poll UPS [nutdev1@127.0.0.1] failed - Data stale Dec 2 07:13:55 t upsd[1942]: Client monuser1@127.0.0.1 set FSD on UPS [nutdev1] Dec 2 07:13:55 t upsmon[2002]: Executing automatic power-fail shutdown Dec 2 07:13:55 t upsmon[2002]: Auto logout and shutdown proceeding Dec 2 07:14:00 t logger: fake shutdown Dec 2 07:17:31 t blazer_ser[1939]: Communications with UPS re-established Dec 2 07:17:31 t upsd[1942]: UPS [nutdev1] data is no longer stale Dec 2 07:22:38 t blazer_ser[1939]: Communications with UPS lost: status read failed! Dec 2 07:22:40 t upsd[1942]: Data for UPS [nutdev1] is stale - check driver Dec 2 07:25:23 t blazer_ser[1939]: Communications with UPS re-established Dec 2 07:25:23 t upsd[1942]: UPS [nutdev1] data is no longer stale Dec 2 07:29:54 t upsd[1942]: Instant command: upsadmin1@127.0.0.1 did shutdown.stop on nutdev1 Dec 2 07:29:55 t blazer_ser[1939]: instcmd: command [shutdown.stop] handled Dec 2 07:30:17 t upsd[1942]: Instant command: upsadmin1@127.0.0.1 did shutdown.stop on nutdev1 Dec 2 07:30:18 t blazer_ser[1939]: instcmd: command [shutdown.stop] handled Dec 2 07:30:25 t upsd[1942]: Instant command: upsadmin1@127.0.0.1 did shutdown.stop on nutdev1 Dec 2 07:30:26 t blazer_ser[1939]: instcmd: command [shutdown.stop] handled Dec 2 07:30:31 t blazer_ser[1939]: Communications with UPS lost: status read failed! Dec 2 07:30:33 t upsd[1942]: Data for UPS [nutdev1] is stale - check driver Dec 2 07:31:32 t blazer_ser[1939]: Communications with UPS re-established Dec 2 07:31:32 t upsd[1942]: UPS [nutdev1] data is no longer stale
As you can see, I tried to clear the FSD flag/state by running this command (the same command that can successfully turn off the load instantly, or toggle the beeper)
upscmd -u upsadmin1 -p mypass nutdev1 shutdown.stop
But it did not clear the FSD state.
Here's some status info (I removed the irrelevant lines)
#I ran this immediately after unplugging line power after 07:08:30 $ upsc nutdev1@127.0.0.1 battery.charge: 69 battery.voltage: 12.20 ups.delay.shutdown: 30 ups.delay.start: 180 ups.load: 0 ups.status: OB **$ date && upsc nutdev1@127.0.0.1** Tue Dec 2 07:11:29 EST 2014 battery.charge: 65 battery.voltage: 12.10 ups.delay.shutdown: 30 ups.delay.start: 180 ups.load: 0 ups.status: OB #none of these fields changed the entire time after this, except ups.status **date && upsc nutdev1@127.0.0.1** Tue Dec 2 07:12:29 EST 2014 battery.charge: 65 battery.voltage: 12.10 ups.status: OB $ date && upsc nutdev1@127.0.0.1 Tue Dec 2 07:18:26 EST 2014 battery.charge: 65 battery.voltage: 12.10 ups.status: FSD OB ups.temperature: 25.0 #there were a few more, all identical, then finally **$ date && upsc nutdev1@127.0.0.1** Tue Dec 2 07:30:28 EST 2014 battery.charge: 65 battery.voltage: 12.10 ups.status: FSD OB $ date && upsc nutdev1@127.0.0.1 Tue Dec 2 07:31:11 EST 2014 Error: Data stale
These are the instant commands supposedly supported by my UPS
**upscmd -u upsadmin1 -p mypass -l nutdev1** Instant commands supported on UPS [nutdev1]: beeper.toggle - Toggle the UPS beeper **works** load.off - Turn off the load immediately **works** load.on - Turn on the load immediately **seems to do nothing** shutdown.return - Turn off the load and return when power is back shutdown.stayoff - Turn off the load and remain off shutdown.stop - Stop a shutdown in progress **doesn't prevent shutdown or remove FSD flag** test.battery.start - Start a battery test test.battery.start.deep - Start a deep battery test test.battery.start.quick - Start a quick battery test test.battery.stop - Stop the battery test
Now I've tried even more possibilities. I tried running test.battery.start.quick to recalibrate the battery a bit, with a 35% load. It ran for a minute or two on battery then switched back to Line power. Then I had two more ideas. I tried disabling the beeper, hoping that the UPS would stay on, but it turned itself off as per usual after 5 minutes. Then I had another idea. I pulled the power plug, then ran test.battery.start, hoping I could run a "battery test" indefinitely. But the UPS STILL turned off after 5 minutes.
Basically this UPS is good for shutting down, and not much else. I'm gonna get another UPS.