[Nut-upsuser] How to change shutdown notification threshold on Fortron UPS Champs (blazer_usb)?
Pavel Hofman
pavel.hofman at ivitera.com
Sat Sep 3 13:53:12 BST 2022
Roger, thanks a lot, your suggestions will fully solve my problem.
Best regards,
Pavel.
Dne 02. 09. 22 v 15:09 Roger Price napsal(a):
> On Fri, 2 Sep 2022, Pavel Hofman wrote:
>
>>> blazer_usb reports:
>>>>> ups.model: WPHVT2K0
>>>>> ups.productid: 5161
>
> Clearly a bug in blazer_usb
>
>>> If battery.charge.low is not available, perhaps it is possible to get
>>> the same effect by watching the voltage drop to a critical value.
>>> This needs upssched and a custom upssched-cmd script.
>>
>> I see. IIUC since I basically want to "override" the LOWBATT event,
>> not to react to it, I will have to periodically parse upsc output and
>> check for the current battery.voltage level when OB. It means
>> basically doing all the work ups-monitor actually does, but with a
>> different threshold (which I do not see how to change in ups-monitor).
>> Do I assume correctly I cannot force/script ups-monitor to do that for
>> me since it already has all the parsed data available?
>>
>> Can I at least call some ups-monitor feature to start the controlled
>> shutdown on all the NUTS networked clients?
>
> A lot of what you need is in chapter 7 of
> https://rogerprice.org/NUT/ConfigExamples.A5.pdf . Ignore all the stuff
> about heartbeat and timers. The EXEC on lines 380 and 381 of
> upsmon.conf in figure 54 will get you to line 398 in upssched.conf in
> figure 56.
>
> At line 398, remove the lines "warning-timer" and "failure-timer", and
> add a line such as
>
> AT ONBATT <myups> EXECUTE watch-battery-charge
>
> Change line 425 in upssched-cmd to VOLTAGE=$( upsc $UPS battery.voltage
> ) You may need to ensure that $VOLTAGE is an integer.
>
> At line 428 in upssched-cmd replace the sections (heart-failure-timer),
> (two-minute-warning-timer) and (one-minute-warning-timer) with something
> like
>
> (watch-battery-charge)
> # Compare the $VOLTAGE with say 48 (Bash insists on integers)
> if [[ $VOLTAGE > 48 ]]; then continue;
> else MSG="Power failure shutdown: Calling upsmon -c fsd, $CHMSG"
> /usr/sbin/upsmon -c fsd
> fi ;;
>
> Roger
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
--
IVITERA a.s., www.ivitera.com
Kafkova 16, 160 00 Praha 6
Rubesova 29, 326 00 Plzen
Czech Republic
Mobil +420 603 163 973
Tel. +420 222 744 111
pavel.hofman at ivitera.com
www.educity.cz www.hrnews.cz
www.katalog-profesionalu.cz www.selflearning.cz
www.hrtv.cz www.jobcity.cz
More information about the Nut-upsuser
mailing list