<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<blockquote style="border-left-color: rgb(26, 188, 156); margin: 0px; padding-left: 10px; border-left-width: thin; border-left-style: solid; padding-bottom: 5px; padding-top: 5px;">Since it's NUT in the NAS which is deciding to order the shutdown, it would be</blockquote>
<blockquote style="border-left-color: rgb(26, 188, 156); margin: 0px; padding-left: 10px; border-left-width: thin; border-left-style: solid; padding-bottom: 5px; padding-top: 5px;">useful to see upsmon.conf, upssched.conf and upssched-cmd (or whatever Synology</blockquote>
<blockquote style="border-left-color: rgb(26, 188, 156); margin: 0px; padding-left: 10px; border-left-width: thin; border-left-style: solid; padding-bottom: 5px; padding-top: 5px;">use if anything) from the NAS to see what criteria they use.</blockquote>
<div dir="auto"><strong>upsmon.conf (on Synology):</strong><br />
RUN_AS_USER root<br />
MONITOR ups@localhost 1 monuser secret master<br />
MINSUPPLIES 1<br />
SHUTDOWNCMD ""<br />
NOTIFYCMD /usr/sbin/upssched<br />
POLLFREQ 5<br />
POLLFREQALERT 5<br />
HOSTSYNC 15<br />
DEADTIME 15<br />
POWERDOWNFLAG /etc/killpower<br />
NOTIFYFLAG ONLINE EXEC<br />
NOTIFYFLAG ONBATT EXEC<br />
NOTIFYFLAG LOWBATT EXEC<br />
NOTIFYFLAG NOCOMM EXEC<br />
NOTIFYFLAG COMMBAD IGNORE <br />
NOTIFYFLAG COMMOK IGNORE<br />
NOTIFYFLAG SHUTDOWN IGNORE<br />
NOTIFYFLAG FSD EXEC<br />
NOTIFYFLAG NOPARENT SYSLOG<br />
RBWARNTIME 43200<br />
NOCOMMWARNTIME 300<br />
FINALDELAY 5<br />
<br />
<strong>upssched.conf (on Synology):</strong><br />
CMDSCRIPT /usr/syno/bin/synoups<br />
PIPEFN /var/run/upssched.pipe<br />
LOCKFN /var/run/upssched.lock<br />
AT ONLINE * EXECUTE online<br />
AT ONLINE * CANCEL-TIMER fsd<br />
AT LOWBATT * EXECUTE lowbatt<br />
AT NOCOMM * EXECUTE nocomm<br />
AT FSD * EXECUTE fsd<br />
AT ONBATT * EXECUTE onbatt<br />
<br />
<strong>upssched-cmd (on Synology):</strong><br />
I don’t see this file.  Here are all the files in the ups folder:<br />
nutscan-usb.h  ups.conf  upsd.conf  upsd.users  upsmon.conf  upssched.conf<br /></div>
<blockquote style="border-left-color: rgb(26, 188, 156); margin: 0px; padding-left: 10px; border-left-width: thin; border-left-style: solid; padding-bottom: 5px; padding-top: 5px;">What is "Safe mode"?  Is it complete power down?, or some sort of hibernation? </blockquote>
<blockquote style="border-left-color: rgb(26, 188, 156); margin: 0px; padding-left: 10px; border-left-width: thin; border-left-style: solid; padding-bottom: 5px; padding-top: 5px;">If it's not a complete power down, how is the hibernation powered?</blockquote>
<blockquote class="spark_indent" style="border: none; margin: 0px 0px 0px 40px; padding: 0px;">
<div style="indent-size: 1"><em>"When the Synology NAS enters Safe Mode, it stops all services and unmounts volumes in order to prevent data loss and shut down (halt for EDS14) safely when the UPS device runs out of power. By default, the system enters Safe Mode when the UPS device starts running low on power. You can also specify the amount of time before the Synology NAS enters Safe Mode when power failure occurs. However, if the UPS device reaches low battery before the specified time, the system enters Safe Mode immediately.</em></div>
</blockquote>
<div dir="auto"><br /></div>
<blockquote class="spark_indent" style="border: none; margin: 0px 0px 0px 40px; padding: 0px;">
<div style="indent-size: 1"><em>In situations where the Synology NAS shuts down during Safe Mode, it will automatically turn on when power is restored if you have enabled the Restart automatically after a power failure option (located at Control Panel > Hardware & Power > General)."</em></div>
</blockquote>
<div dir="auto"><br />
I gather this puts it in a state where it is ready for imminent power loss and won’t damage or lose any data.  I have enabled “Shutdown UPS when the system enter Safe Mode” and I have also enabled “Restart automatically after a power failure” as noted above.  I have always had these two options enabled.  <br />
<br />
Yesterday I recently disabled HDD Advanced Hibernation option as I thought that may interfere with NUT on my servers being able to communicate with the NUT server on the NAS, hence the immediate shutdown.  Now they will spin-up on their own, but it takes 5-10 seconds.  My thought was if they can’t communicate initially, they assume the server is dead and shut down.  Would that make sense at all?  <br />
<br />
HDD Hibernation essentially spins down the hard drives when there has been no activity.  I had it set at one hour; I have since disabled that setting.  I have not ever set the Synology itself to go to sleep or to auto-shutdown.<br />
<br />
From the Synology support site:<br /></div>
<blockquote class="spark_indent" style="border: none; margin: 0px 0px 0px 40px; padding: 0px;">
<div style="indent-size: 1"><em>You can specify the period of time hard disks remain idle before entering HDD hibernation mode. During HDD hibernation, hard disks stop spinning, reducing power consumption and extending the lifespan of hard disks. You can specify different periods of time for internal hard disks and external eSATA/USB hard disks.</em></div>
</blockquote>
<blockquote class="spark_indent" style="border: none; margin: 0px 0px 0px 40px; padding: 0px;">
<div style="indent-size: 1"><br /></div>
</blockquote>
<blockquote class="spark_indent" style="border: none; margin: 0px 0px 0px 40px; padding: 0px;">
<div style="indent-size: 1"><em>Phase 1: HDDs power down after a period of inactivity (idle time). You may go to DSM > Control Panel > Hardware & Power > HDD Hibernation to configure the length of inactivity for the HDDs to enter hibernation.</em></div>
</blockquote>
<blockquote class="spark_indent" style="border: none; margin: 0px 0px 0px 40px; padding: 0px;">
<div style="indent-size: 1"><br /></div>
</blockquote>
<blockquote class="spark_indent" style="border: none; margin: 0px 0px 0px 40px; padding: 0px;">
<div style="indent-size: 1"><em>Phase 2: Advanced Hibernation/Deep Sleep will be implemented for the HDDs to further reduce power consumption. You may go to DSM > Control Panel > Hardware & Power > HDD Hibernation to enable advanced HDD hibernation.</em></div>
</blockquote>
<blockquote class="spark_indent" style="border: none; margin: 0px 0px 0px 40px; padding: 0px;">
<div style="indent-size: 1"><br /></div>
</blockquote>
<blockquote style="border-left-color: rgb(26, 188, 156); margin: 0px; padding-left: 10px; border-left-width: thin; border-left-style: solid; padding-bottom: 5px; padding-top: 5px;">You should remove line 1 : RUN_AS_USER nut</blockquote>
<div dir="auto">Ok, I will comment that back out.  That won’t interfere with anything?  What user would it run as?  Will it have access to upsmon.conf?<br />
<br />
<br />
Thanks,<br />
<br />
Todd</div>
</div>
<div name="messageSignatureSection"><br />
<p style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue"; color: rgb(34, 34, 34);">--</p>
<p style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue"; color: rgb(51, 51, 51);"><span style="color: #222222"><b>Todd Benivegna</b></span> <span style="color: #222222">//</span> <a href="mailto:todd@benivegna.com">todd@benivegna.com</a></p>
</div>
<div name="messageReplySection">On Aug 9, 2020, 3:07 AM -0400, Roger Price <roger@rogerprice.org>, wrote:<br />
<blockquote type="cite" style="border-left-color: grey; border-left-width: thin; border-left-style: solid; margin: 5px 5px;padding-left: 10px;">On Fri, 7 Aug 2020, Todd Benivegna wrote:<br />
<br />
Hello Todd, sorry for the delay replying, I was away for a while. It's ok to<br />
post configuration files in this list if blank lines and comments are removed.<br />
<br />
<blockquote type="cite">On the Synology (I didn’t edit any of these files):<br />
ups.conf:  https://hastebin.com/dedereqizi.shell<br /></blockquote>
<br />
pollinterval = 5<br />
[ups]<br />
driver = usbhid-ups<br />
port = auto<br />
<br />
<blockquote type="cite">upsd.conf:  https://hastebin.com/pupeseweda.css<br /></blockquote>
<br />
LISTEN 192.168.1.70<br />
LISTEN 2601:cf:8200:43d0:211:32ff:fe63:60d7<br />
LISTEN fe80::211:32ff:fe63:60d7<br />
LISTEN 127.0.0.1<br />
LISTEN ::1<br />
<br />
<blockquote type="cite">upsd.users:  https://hastebin.com/ocenamecex.cs<br /></blockquote>
<br />
[monuser]<br />
password = secret<br />
upsmon master<br />
<br />
Since it's NUT in the NAS which is deciding to order the shutdown, it would be<br />
useful to see upsmon.conf, upssched.conf and upssched-cmd (or whatever Synology<br />
use if anything) from the NAS to see what criteria they use.<br />
<br />
Roger<br />
_______________________________________________<br />
Nut-upsuser mailing list<br />
Nut-upsuser@alioth-lists.debian.net<br />
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</blockquote>
</div>
</body>
</html>