3

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.

1

Unless you are using commands in upssched.conf, NUT should wait until the UPS reports low battery before doing a shutdown. Check to make sure you have nothing scheduled there.

Once NUT starts the shutdown, it will trigger the UPS to recycle after a timeout. This is to ensure the Server comes back up if Power is restored before the UPS runs out of battery. The time is specified as FINALDELAY in upsmon.conf.

You may want to enable logging of all notifications for all events in upsmon.conf. This may enable you to determine why the system is shutting down so soon. These are the settings I use:

NOTIFYFLAG ONBATT   SYSLOG+WALL
NOTIFYFLAG ONLINE   SYSLOG+WALL
NOTIFYFLAG FSD      SYSLOG+WALL
NOTIFYFLAG SHUTDOWN SYSLOG+WALL

NOTIFYFLAG LOWBATT  SYSLOG
NOTIFYFLAG REPLBATT SYSLOG

NOTIFYFLAG COMMOK   SYSLOG
NOTIFYFLAG COMMBAD  SYSLOG+WALL
NOTIFYFLAG NOCOMM   SYSLOG+WALL
NOTIFYFLAG NOPARENT SYSLOG+WALL

If NUT is shutting down bases on a timer script, this is the kind of line I would expect to see in the log. It appears the UPS stops communicating after 5 minutes, and NUT is doing a last ditch FSD (forced shutdown). This is what I would want it to do. Five minutes should be long enough to indicate power is not likely to return quickly.

Dec  2 07:13:55 t upsd[1942]: Client monuser1@127.0.0.1 set FSD on UPS [nutdev1]

I would expect NUT to use shutdown.return to signal the UPS to shutdown. This should cause the UPS to restart once power is restored, and do a brief shutdown if the power is restored before the shutdown completes.

I would expect the ups.delay.shutdown and ups.delay.start to be the tunables for the UPS shutdown restart cycle. ups.delay.shutdown should allow time for the server to complete the shutdown cycle, and may need to be increased. ups.delay.start should be the time it takes for power to stabilize after the power has returned. It also allows some time for the batteries to recharge before load is applied.

Normally, you would not want to run the batteries down to low before shutting down. You want to have enough battery to go through another cycle or two in case the power drops again.

  • Thanks for the reply. This doesn't seem possible because I've never seen an LB status, and I've queried the UPS myself every few seconds leading up to a power off. Also please note how I prevented the shutdown by stopping the ups-monitor service for some tests. The UPS is certainly doing energy-saving. Also please note the problem is not that the system is shutting down too soon. I want to make it very clear that the problem is the UPS turns itself off and thus far I've not found a way to tell the UPS to stay on, even though there is only a light load. – user1862165 Dec 2 '14 at 1:34
  • @user1862165 It is possible to schedule a script when ONBATT which will cause a timed shutdown. Logging all notifications will tell you why the system is going down. I would expect it will be either a low battery notification from the UPS or a forced shutdown from a script. – BillThor Dec 2 '14 at 1:38
  • I guarantee it's not low battery. The battery floats at 12.6v after turning off the load. (With no line power connected) I can run the tests over and over without recharging the UPS and the time taken for it to turn itself off is the same. The battery has boatloads of capacity for the tests being run. That time period has nothing to do with NUT. Please read my post again carefully. – user1862165 Dec 2 '14 at 1:42
  • @user1862165 That doesn't rule out and FSD command from a script. Log everything and it will help you debug the issue. The UPS may also be sending a message that gets misinterpreted as low battery. Low battery is based on a signal from the UPS not but NUT. – BillThor Dec 2 '14 at 1:44
  • Okay, I'll log everything as you suggest. I'll also change the shutdown command to logger fake shutdown – user1862165 Dec 2 '14 at 1:46
0

Many UPS' have a low load auto shutdown. If the load is less than 10% of the UPS' rated load then it will shut down after 5 minutes. I have the same problem with my Proline UPS. Just put more load on the UPS and it won't shutdown. It's a bit counter intuitive if you are trying to conserve battery power, I know.

I have not been able to find a software setting to turn that feature off. It seems like its hard coded into the firmware.

I have put a sonoff smart switch on the load side and programmed it to turn a 10% load on for 10 seconds every 4 minutes. It's not elegant but it keeps the ups running.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.