<div dir="auto">The file is created by `upsmon` (its half running as `root`) when it is handling FSD situations and is a "primary" for some device(s).<div dir="auto"><br></div><div dir="auto">Probably you can trigger one synthetically by `upsmon -c fsd`.</div><div dir="auto"><br></div><div dir="auto">Jim</div><div dir="auto"><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Jun 17, 2025, 14:02 Dario Novakovic <<a href="mailto:darionis@yahoo.com">darionis@yahoo.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Exactly Jim, this bothers me too much to give up :)<br>
<br>
My upsmon.conf *does contain* line: POWERDOWNFLAG /etc/killpower<br>
<br>
I checked for the existence of the file during shutdown with "/sbin/upsmon -K", and it exited with "1", meaning error: no POWERDOWNFLAG.<br>
<br>
<br>
It is actually Truenas 25.04, with NUT 2.8.0. This may be Truenas issue, but I would like to check NUT first.<br>
<br>
Now, for the logs: all I see about killpower is this line<br>
nut-monitor[2688]: Using power down flag file /etc/killpower<br>
and it is logged when NUT service is starting. Thats all. No errors.<br>
<br>
<br>
I attached log of the shutdown procedure. Truenas is configured to shutdown in 60 seconds after power failure, and that is OK, but nothing about "killpower".<br>
<br>
<br>
Now I wonder what creates POWERDOWNFLAG, and why it is not created. I attached shutdown log, removed uneeded lines. Truenas is configured to wait 60 seconds and if power is not restored it shuts down.<br>
<br>
Thanks,<br>
Dario<br>
<br>
<br>
<br>
<br>
On Monday, June 16, 2025 at 05:23:46 PM GMT+2, Jim Klimov <<a href="mailto:jimklimov%2Bnut@gmail.com" target="_blank" rel="noreferrer">jimklimov+nut@gmail.com</a>> wrote: <br>
<br>
<br>
>Cheers,<br>
><br>
> Your test results seem encouraging, so giving up now sounds unfortunate - perhaps just one more push is needed:<br>
><br>
>* if `upsdrvctl shutdown` works, then at least basic driver settings in ups.conf (and driver+device) do suffice for the action;<br>
>* for a "killpower file", check that your upsmon.conf contains a line like<br>
><br>
>POWERDOWNFLAG /etc/killpower<br>
><br>
>** This line must be explicitly present (although a good path might be in a tmpfs, like /run/nut/killpower instead).<br>
>** Check upsmon logs - at least current NUT code should report if the value is defined or not, and if it failed to create the file for example.<br>
><br>
>* For the file to have effect, it should be consulted during OS shutdown. I think you've never mentioned the OS nor NUT version, so details of this part are highly variable. In a Linux system with systemd and NUT v2.8.x, you would have a />usr/lib/systemd/system-shutdown/nutshutdown to call `upsdrvctl shutdown` when deemed needed.<br>
><br>
>Jim<br>
<br>
<br>
On Mon, Jun 16, 2025, 14:11 Dario Novakovic via Nut-upsuser <<a href="mailto:nut-upsuser@alioth-lists.debian.net" target="_blank" rel="noreferrer">nut-upsuser@alioth-lists.debian.net</a>> wrote:<br>
> Thanks Jim and Robert!<br>
> <br>
> I confirmed that ups understands "turn off" request from the PC, with "upsdrvctl shutdown".<br>
> However, I am not sure if "killpower" file is created, when ups goes on battery.<br>
> <br>
> On the other hand I am not sure how CyberPower UPS interprets config params: offdelay, ups.delay.shutdown, ups.timer.shutdown. I have been through so many docs, forums, issue reports, etc.<br>
> This is so confusing and messy, I am giving up. <br>
> <br>
> <br>
> Thanks all,<br>
> Dario<br>
> <br>
> <br>
> <br>
> <br>
> On Thursday, June 12, 2025 at 05:15:02 PM GMT+2, Dario Novakovic via Nut-upsuser <<a href="mailto:nut-upsuser@alioth-lists.debian.net" target="_blank" rel="noreferrer">nut-upsuser@alioth-lists.debian.net</a>> wrote: <br>
> <br>
> I am using truenas with Cyber power CP900EPFCLCD UPS. All is well, server shuts down after power loss in specified time.<br>
> <br>
> Problem is that UPS remains ON. I would like UPS to turn OFF and I will turn it on, when the power comes back. I tried many various configuration but it does not affect the UPS.<br>
> <br>
> Before I send all my config files and everything, I would like to understand how it works. <br>
> <br>
> I have been messing with nut for days, setting various "delay"s, tried many different settings and configs but I feel like I am missing something. I have couple of general questions:<br>
> <br>
> 1. Is it possible to turn the UPS off, after PC shut down.<br>
> 2. If yes, how does it work? What makes UPS go off, when PC is off? What kind of command or information is sent to UPS to make it turn off<br>
> 3. What is the purpose of "ups.delay.shutdown". Documentation says "Interval to wait after shutdown with delay command (seconds)". "Wait" for what exactly?<br>
> <br>
> <br>
> Thanks,<br>
> Dario<br>
> <br>
> _______________________________________________<br>
> Nut-upsuser mailing list<br>
> <a href="mailto:Nut-upsuser@alioth-lists.debian.net" target="_blank" rel="noreferrer">Nut-upsuser@alioth-lists.debian.net</a><br>
> <a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser" rel="noreferrer noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
> <br>
> _______________________________________________<br>
> Nut-upsuser mailing list<br>
> <a href="mailto:Nut-upsuser@alioth-lists.debian.net" target="_blank" rel="noreferrer">Nut-upsuser@alioth-lists.debian.net</a><br>
> <a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser" rel="noreferrer noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
> <br>
<br>
</blockquote></div>