<html><p>I've had fun with nut on RH systems, these are my notes to get it working:</p><p style="-webkit-text-stroke-width:0px;background-color:rgb(255, 255, 255);color:rgb(0, 0, 0);font-family:"Segoe UI", "Segoe UI Emoji", "Segoe UI Symbol", Lato, "Liberation Sans", "Noto Sans", "Helvetica Neue", Helvetica, sans-serif;font-size:15.2px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;margin:1em 0px;orphans:2;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-decoration-thickness:initial;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;"><i>Create /usr/lib/tmpfiles.d/nut-client.conf:</i></p><pre style="-webkit-text-stroke-width:0px;background-color:rgb(248, 249, 250);border:1px solid rgb(200, 204, 209);color:rgb(0, 0, 0);font-family:Menlo, Consolas, Monaco, "Noto Mono", "Nimbus Mono L", monospace;font-size:15.2px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;orphans:2;overflow:auto;padding:1em;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-decoration-thickness:initial;text-indent:0px;text-transform:none;white-space:pre-wrap;widows:2;word-spacing:0px;"><i>D /run/nut 0770 root nut -
</i></pre><p style="-webkit-text-stroke-width:0px;background-color:rgb(255, 255, 255);color:rgb(0, 0, 0);font-family:"Segoe UI", "Segoe UI Emoji", "Segoe UI Symbol", Lato, "Liberation Sans", "Noto Sans", "Helvetica Neue", Helvetica, sans-serif;font-size:15.2px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;margin:1em 0px;orphans:2;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-decoration-thickness:initial;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;"><i>...the file did not exist, and so the PID folder/file was not getting generated. Then the driver would start.</i></p><p style="-webkit-text-stroke-width:0px;background-color:rgb(255, 255, 255);color:rgb(0, 0, 0);font-family:"Segoe UI", "Segoe UI Emoji", "Segoe UI Symbol", Lato, "Liberation Sans", "Noto Sans", "Helvetica Neue", Helvetica, sans-serif;font-size:15.2px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;margin:1em 0px;orphans:2;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-decoration-thickness:initial;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;"><i>Also had to setup enabled services (still not 100% confident that this is totally correct):</i></p><pre style="-webkit-text-stroke-width:0px;background-color:rgb(248, 249, 250);border:1px solid rgb(200, 204, 209);color:rgb(0, 0, 0);font-family:Menlo, Consolas, Monaco, "Noto Mono", "Nimbus Mono L", monospace;font-size:15.2px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;orphans:2;overflow:auto;padding:1em;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-decoration-thickness:initial;text-indent:0px;text-transform:none;white-space:pre-wrap;widows:2;word-spacing:0px;"><i>[root@emp80 ups]# systemctl list-unit-files | grep -i nut
nut-driver-enumerator.path disabled
nut-driver-enumerator.service disabled
nut-driver@.service disabled
nut-monitor.service disabled
nut-server.service disabled
nut-driver.target enabled
nut.target enabled</i></pre><p>I made no changes to unit files. Result:<br><br><span style="font-family:'Courier New', Courier, monospace;">[root@emp90 ~]# systemctl list-units | grep nut</span><br><span style="font-family:'Courier New', Courier, monospace;"> nut-driver@eaton5sx.service loaded active running Network UPS Tools - device driver for eaton5sx</span><br><span style="font-family:'Courier New', Courier, monospace;"> nut-monitor.service loaded active running Network UPS Tools - power device monitor and shutdown controller</span><br><span style="font-family:'Courier New', Courier, monospace;"> nut-server.service loaded active running Network UPS Tools - power devices information server</span><br><span style="font-family:'Courier New', Courier, monospace;"> system-nut\x2ddriver.slice loaded active active Slice /system/nut-driver</span><br><span style="font-family:'Courier New', Courier, monospace;"> nut-driver.target loaded active active Network UPS Tools - target for power device drivers on this system</span><br><span style="font-family:'Courier New', Courier, monospace;"> nut.target loaded active active Network UPS Tools - target for power device drivers, data server and monitoring client (if enabled) on this system</span><br> </p><p>Simon</p><p> </p><p><br>On Monday, July 29, 2024 07:52 AEST, Tim Dawson <tadawson@tpcsvc.com> wrote:<br><br> </p><blockquote type="cite" cite="840CFEF1-5A1D-4D15-AB84-7BC0CA8BDAA0@tpcsvc.com"><div dir="auto">Look in the startup logs and see where itnis starting. I'm not at a RH system at the moment, but at work, I have had to do this, so can look there,mor perhaps put Nut on the test RH8 VM I spun up for other rrasons on Friday and work out the syntax. Not sure if the systemd file you are using came in the RPM or not, but if it did, it's almost a crime that this critical detail was overlooked.</div><p><br><br> </p><div class="gmail_quote"><div dir="auto">On July 28, 2024 5:33:25 PM EDT, Bill Gee <bgee@campercaver.net> wrote:</div><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex;"><div dir="auto">No luck. I modified both /usr/lib/systemd/system/nut.target and /usr/lib/systemd/nut-server.target The behavior did not change.<br><br>Looking at it a bit more, I noticed a comment in /usr/lib/systemd/system/nut-server.service to the effect that the network does not need to be running - merely present - when nut starts. If a running network is wanted, then a new file needs to be added.<br><br>I created /etc/systemd/system/nut-server.service.d/network.conf with these three lines:<br><br>[Unit]<br>Requires=network-online.target<br>After=network-online.target<br><br>I ran "systemctl daemon-reload" and rebooted. Still no luck. nut-server did not start during the boot. It starts with no problems when run from a command line:<hr>[root@mythtv ~]# systemctl status nut-server<br>○ nut-server.service - Network UPS Tools - power devices information server<br> Loaded: loaded (/usr/lib/systemd/system/nut-server.service; enabled; preset: disabled)<br> Drop-In: /usr/lib/systemd/system/service.d<br> └─10-timeout-abort.conf<br> /etc/systemd/system/nut-server.service.d<br> └─environ.conf, network.conf<br> Active: inactive (dead)<br>[root@mythtv ~]# systemctl start nut-server<br>[root@mythtv ~]# systemctl status nut-server<br>● nut-server.service - Network UPS Tools - power devices information server<br> Loaded: loaded (/usr/lib/systemd/system/nut-server.service; enabled; preset: disabled)<br> Drop-In: /usr/lib/systemd/system/service.d<br> └─10-timeout-abort.conf<br> /etc/systemd/system/nut-server.service.d<br> └─environ.conf, network.conf<br> Active: active (running) since Sun 2024-07-28 16:26:42 CDT; 2s ago<br> Process: 1703 ExecStartPre=/usr/bin/systemd-tmpfiles --create /usr/lib/tmpfiles.d/nut-common-tmpfiles.conf (code=ex><br> Process: 1706 ExecStartPost=/bin/grep -E Units|Max open files /proc/${MAINPID}/limits (code=exited, status=0/SUCCES><br> Main PID: 1705 (upsd)<br> Tasks: 1 (limit: 9460)<br> Memory: 944.0K (peak: 2.9M)<br> CPU: 27ms<br> CGroup: /system.slice/nut-server.service<br> └─1705 /usr/sbin/upsd -F<hr>Bill Gee<br><br>On 7/28/24 13:53, Tim Dawson wrote:<br> </div><blockquote class="gmail_quote" style="border-left:1px solid #729fcf;margin:0pt 0pt 1ex 0.8ex;padding-left:1ex;"><div dir="auto">Wants=network.target network-online.target<br>After=network.target network-online.target<br><br>Seems to be the case on RedHat8, and other RedHat based distros should match.<br><br><br>On July 28, 2024 1:56:49 PM EDT, Bill Gee <bgee@campercaver.net> wrote:<br><br> These files came from the distro package. I did not change anything<br> myself. Systemd newbie here ...<br><br> So the detailed question is - Exactly what change is needed to add<br> the network-target dependency? I suspect it is not enough to simply<br> remove the comment symbol on those two lines.<hr> Bill Gee<br><br> On 7/28/24 10:10, Tim Dawson wrote:<br><br> Seems like you would also want the "network-target" dependency,<br> since nut will likelynfail without networking being up. (This<br> would also explwin why the sysctl start ... works after boot,<br> but not during . . .<br><br><br> On July 28, 2024 10:37:15 AM EDT, Bill Gee<br> <bgee@campercaver.net> wrote:<br><br> I have also been having this problem. Checking a few of the files<br> </div></blockquote><div dir="auto"><hr>Nut-upsuser mailing list<br>Nut-upsuser@alioth-lists.debian.net<br><a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a><br> </div></blockquote></div><div dir="auto"><div class="k9mail-signature">-- <br>Sent from my Android device with K-9 Mail. Please excuse my brevity.</div></div></blockquote><p><br>-- <br> </p><div class="raw-html-embed sogo-raw-html-embed">Simon Wilson<br>M: 0400 121 116</div></html>