[Nut-upsuser] UPS restart delay

Arnaud Quette aquette.dev at gmail.com
Mon Aug 6 08:34:28 UTC 2012


Hi Dan,

first, just to be sure: are you using newmge-shut from NUT 2.6.4?

2012/8/3 Daniel O'Connor <doconnor at gsoft.com.au>

>
> On 03/08/2012, at 17:31, Arnaud Quette <aquette.dev at gmail.com> wrote:
> >> > I tried mge-shut in 2.6 with no change, but newmge-shut with 2.6
> showed this parameter, thanks!
> >>
> >>
> >> Unfortunately it doesn't appear to have any effect, ie..
> >> Aug 02 11:34:04 ups1 at localhost upslog[1524] load: 18 temp: NA voltage:
> 0.0 recharge: 65 frequency: 0.0 status: OB DISCHRG
> >> Aug 02 11:39:04 ups1 at localhost upslog[1524] load: 18 temp: NA voltage:
> 0.0 recharge: 50 frequency: 0.0 status: OB DISCHRG
> >> Aug 02 11:39:14 ups1 at localhost upslog[1524] load: 18 temp: NA voltage:
> 0.0 recharge: 50 frequency: 0.0 status: FSD OB DISCHRG LB
> >> Aug 02 11:53:01 ups1 at localhost upslog[1524] load: 17 temp: NA voltage:
> 225.0 recharge: 8 frequency: 49.0 status: OL CHRG
> >> Aug 02 11:58:01 ups1 at localhost upslog[1524] load: 18 temp: NA voltage:
> 225.0 recharge: 11 frequency: 50.0 status: OL CHRG
> >>
> >> [battery.charge.low]
> >> Remaining battery level when UPS switches to LB (percent)
> >> Type: STRING
> >> Value: 50
> >>
> >> [battery.charge.restart]
> >> Minimum battery level for restart after power off (percent)
> >> Type: STRING
> >> Value: 60
> >>
> > as stated in the description, you must go through a "power off" or
> status off, for this to work
> > Ie, once you reach "FSD OB LB", the shutoff (UPS poweroff) command must
> be applied to the UPS.
> > once off, and the power is back, it will wait for battery.charge.restart
> level to be reached before reapplying power to its output.
> > for manual / unit testing, you must issue an "upscmd ... load.off |
> shutdown.return" or equivalent, to get the OFF ups.status
>
> The power was removed and the shutdown script calls 'upsdrvctl stop' and
> then 'upsdrvctl shutdown' - is that the right thing to do?
>

the very right thing to do is to first fully stop NUT (including driver(s),
upsd and upsmon).
then call 'upsdrvctl shutdown'.

It seems the UPS does not turn itself off properly.
>

depending on the exact timing of your sequence, you may be running into a
race condition, where the previous shut driver is not yet stop, and the new
('shutdown') instance is already started.

also, it seems your battery.charge.low is set to 50. can you please confirm
it, since it's not in ups.conf (so probably done through upsrw)?


>  >> I have the following ups.conf entry..
> >> [ups1]
> >>         driver = newmge-shut
> >>         port = /dev/cuau1
> >>         ondelay = 190
> >>         offdelay = 120
> >>
> >> The delay is because I am using FreeBSD and it does not remount the
> disks read only - the shutdown script calls 'upsdrvctl sutdown' when
> everything is still mounted read/write.
> >>
> > isn't 'upsdrvctl shutdown' called around the end of the halt script,
> once HD are in RO mode, or just before?
>
> Just before, the script is called during shutdown but everything is still
> RW. FreeBSD does not remount things RO and run some scripts, hence the
> offdelay/ondelay being relatively large.
>

so there are 2 things:
1) fix the shutoff sequence to have the UPS powered off when needed
2) solve the battery.charge.restart issue

@Fred: could you please test the following with an EX 11 RT:
1) simple shutoff (Ie, just call "newmge-shut -k..." or "upsdrvctl
shutdown") and check that the UPS is powered off,
2) check that "battery.charge.restart" variable is available on this unit,
and behaving correctly (Ie, if set to 30, the UPS will restart only once
battery.charge reaches 30 %).

cheers,
Arnaud
-- 
Linux / Unix / Opensource Engineering Expert - Eaton -
http://opensource.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20120806/f2449cc0/attachment.html>


More information about the Nut-upsuser mailing list