From: Lonnie A. <li...@lo...> - 2018-05-18 00:45:16
|
> Now if the UPS has not drained itself completely before power comes back, the power never goes out, so AstLinux never comes back up. That is what this option (when enabled) in the Network tab is for -- Kill Power on the UPS after a Powerfail Shutdown: [enabled] -- It may depend on your UPS to properly come alive when the line power is restored. Lonnie > On May 17, 2018, at 7:14 PM, David Kerr <Da...@Ke...> wrote: > > So, on the topic of shutdown.... The problem is that if AstLinux shuts down, there is no way to bring it back up again remotely... at least not that I know of. I have to physically go to the box, pull the power and plug it back in again (or press a reset switch). Now if the UPS has not drained itself completely before power comes back, the power never goes out, so AstLinux never comes back up. > > So I think what I want is to let AstLinux keep running until the UPS dies completely. It is ungraceful, but it is unlikely to cause much harm. A fsck run at reboot will probably occur. > > Reading up on upsmon I think I have two options. In upsmon.conf I could change NOTIFYFLAG LOBATT to just syslog and not exec the NOTIFYCMD script... which is where I suspect the shutdown is triggered (I've not checked that though). Or I think I could set MINSUPPLIES to 0 (zero) which tells upsmon that it is acceptable to have less than one UPS available. > > I've not tested either of these yet, but thought I would post here and get reactions. > > David. > > > > > > On Thu, May 17, 2018 at 11:01 AM, Michael Keuter <li...@mk...> wrote: > > > Am 17.05.2018 um 16:50 schrieb Michael Keuter <li...@mk...>: > > > >> > >> Am 17.05.2018 um 16:31 schrieb Michael Keuter <li...@mk...>: > >> > >> > >>> Am 17.05.2018 um 16:12 schrieb David Kerr <da...@ke...>: > >>> > >>> Starting a thread among developers on this topic to record some observations. Now on day two of no power or internet and having got WAN failover working yesterday I have some observations... > >> > >> Hopefully the power gets back soon … > >> > >>> Status page still shows my eth0 IPv4 address, which is 192.168.100.10 issued by my cable modem as external network down. > >>> > >>> WAN failover status shows 192.168.100.1 as (bogus) primary gateway and 172.20.10.1 as accurate. But what is needed is external IP address. > >>> > >>> My ddclient uses eth0 as the external IPv4 address. So my dynamic DNS updates are all failing/bogus. Either I change to use an external site to determine my IP, or I do something in WAN failover script to change what ddclient does. Any thoughts as to best approach? I want something automatic that will work whether using primary or failover. > >> > >> Some of that stuff can be automated with the optional Action script: > >> https://doc.astlinux.org/userdoc:tt_wan_failover#action_script_optional > >> > >>> I turn off my generator overnight and run network from a large UPS. According to syslog Astlinux decided to shutdown at 6am when upsmon determined low battery. I think it was at 20% left, but at that level I still have 90-120 minutes of runtime left. Is there a setting to change when Astlinux does the shutdown? > >> > >> I guess in "/etc/ups/upsmon.conf" (but no idea which is the right parameter). You can create your own file in "/mnt/kd/". > > > > I think I was wrong: https://networkupstools.org/docs/man/ups.conf.html > > Pay attention to the "ignorelb", "default.<variable>" and "override.<variable>" parameters. > > > > Checkout this command in CLI to get the values: > > > > ---- > > upsc ups@localhost > > battery.charge: 100 > > battery.charge.low: 10 > > battery.charge.warning: 50 > > ... > > ... > > ---- > > Update: There's even more :-): > > upsrw ups@localhost > [battery.charge.low] > Remaining battery level when UPS switches to LB (percent) > Type: STRING > Maximum length: 10 > Value: 10 > > You can also set variables with "upsrw", e.g. in "/mnt/kd/rc.elocal". You need the username and password from "/etc/ups/upsd.users". > > Michael > > http://www.mksolutions.info > > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Astlinux-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/astlinux-devel > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________ > Astlinux-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/astlinux-devel |