Hi Dan,<br><br><div class="gmail_quote">2012/8/3 Daniel O'Connor <span dir="ltr"><<a href="mailto:doconnor@gsoft.com.au" target="_blank">doconnor@gsoft.com.au</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
On 27/07/2012, at 17:36, Daniel O'Connor wrote:<br>
<br>
><br>
</div><div class="im">> On 21/07/2012, at 22:55, Charles Lepple wrote:<br>
>>> Does anyone know if this is possible? A setting like this would provide some hysteresis for successive power failures which would be handy to have :)<br>
>><br>
>> I don't know about that specific hardware, but the variables which would control this are battery.charge.restart ("Minimum battery level for UPS restart after power-off") and ups.delay.start ("Interval to wait before restarting the load (seconds)"). Check the output of "upsrw <ups>" to see if that variable is supported with your combination of UPS and driver.<br>

>><br>
>> Which version of NUT are you using? There might be a newmge-shut driver included as well.<br>
><br>
> I tried mge-shut in 2.6 with no change, but newmge-shut with 2.6 showed this parameter, thanks!<br>
<br>
<br>
</div>Unfortunately it doesn't appear to have any effect, ie..<br>
Aug 02 11:34:04 ups1@localhost upslog[1524] load: 18 temp: NA voltage: 0.0 recharge: 65 frequency: 0.0 status: OB DISCHRG<br>
Aug 02 11:39:04 ups1@localhost upslog[1524] load: 18 temp: NA voltage: 0.0 recharge: 50 frequency: 0.0 status: OB DISCHRG<br>
Aug 02 11:39:14 ups1@localhost upslog[1524] load: 18 temp: NA voltage: 0.0 recharge: 50 frequency: 0.0 status: FSD OB DISCHRG LB<br>
Aug 02 11:53:01 ups1@localhost upslog[1524] load: 17 temp: NA voltage: 225.0 recharge: 8 frequency: 49.0 status: OL CHRG<br>
Aug 02 11:58:01 ups1@localhost upslog[1524] load: 18 temp: NA voltage: 225.0 recharge: 11 frequency: 50.0 status: OL CHRG<br>
<br>
[battery.charge.low]<br>
Remaining battery level when UPS switches to LB (percent)<br>
Type: STRING<br>
Value: 50<br>
<br>
[battery.charge.restart]<br>
Minimum battery level for restart after power off (percent)<br>
Type: STRING<br>
Value: 60<br></blockquote><div><br>as stated in the description, you must go through a "power off" or status off, for this to work<br>Ie, once you reach "FSD OB LB", the shutoff (UPS poweroff) command must be applied to the UPS.<br>
once off, and the power is back, it will wait for battery.charge.restart level to be reached before reapplying power to its output.<br>for manual / unit testing, you must issue an "upscmd ... load.off | shutdown.return" or equivalent, to get the OFF ups.status<br>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[ups.start.auto]<br>
UPS starts when mains is (re)applied<br>
Type: STRING<br>
Value: yes<br>
<br>
[ups.start.battery]<br>
Allow to start UPS from battery<br>
Type: STRING<br>
Value: no<br>
<br>
[ups.start.reboot]<br>
UPS reboots when power returns during shutdown delay<br>
Type: STRING<br>
Value: no<br>
<br>
I have the following ups.conf entry..<br>
[ups1]<br>
        driver = newmge-shut<br>
        port = /dev/cuau1<br>
        ondelay = 190<br>
        offdelay = 120<br>
<br>
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.<br></blockquote><div><br>isn't 'upsdrvctl shutdown' called around the end of the halt script, once HD are in RO mode, or just before?<br>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I added some debugging to my shutdown script and upsdrvctl is exiting with a 0 code so I think it's doing the right thing.<br>
<br>
Unfortunately this UPS is remote so testing it is difficult :(<br>
<br>
Any suggestions welcome :)<br></blockquote></div><br>hope it helps.<br><br>cheers,<br clear="all">Arnaud<br>-- <br>Linux / Unix / Opensource Engineering Expert - Eaton - <a href="http://opensource.eaton.com" target="_blank">http://opensource.eaton.com</a><br>
Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org" target="_blank">http://www.networkupstools.org</a><br>Debian Developer - <a href="http://www.debian.org" target="_blank">http://www.debian.org</a><br>
Free Software Developer - <a href="http://arnaud.quette.fr" target="_blank">http://arnaud.quette.fr</a><br><br>