I think the client should be able to do that with `upssched` as long as the `upsmon` calls it to trigger the events. Thinking of it, the common use-case is indeed time (e.g. 5 minutes after on-battery, certain systems begin their shutdown), or the primary upsmon telling others to FSD ASAP.
Maybe the other use-cases you mention would benefit from a PR - primarily for `upsmon` configuration syntax and actual logic to do certain actions based on certain data states (e.g. "we ticked to battery 9% and previous reading was >= 10% - gotta call the SHUTDOWNCMD handler!", which could be upssched to filter out floating glitches, or directly the shutdown script...) And as always, PRs are welcome ;) Jim On Sun, Jul 16, 2023 at 9:39 PM Arnaldo H Viegas de Lima < arna...@viegasdelima.com> wrote: > One thing that I think NUT misses is the client side being able to decide > to shutdown by itself based on time (this can be done), battery charge (ex > if bellow 10%), and estimated runtime left (if available and considered > reliable/calibrated). > Without having to sort on the LB state from the server. > > Sent from my iPhone with iTypos > > On Jul 16, 2023, at 4:34 PM, Willcox David via Nut-upsuser < > nut-upsuser@alioth-lists.debian.net> wrote: > > > Interesting. Something similar came up in late May. Look for "[Nut-upsuser] > Synthesize low batt (LB) fron SNMP UPS which does not support this?” Is > there an archive of this list? I an’t find it. I’d been trying to figure > out how to do that itself, but then found some code in drivers/dstate.c > that looked like it would work, but someone else replied that they’d > tried it and it didn’t work. > > But that was about getting the NUT server to synthesize LB to its clients > before the actual UPS did. > > If you’re running NUT as a client on your server, then yes, as others > have noted, upssched on your server is probably the way to go. > > > On Jul 16, 2023, at 9:00 AM, Dan Langille via Nut-upsuser < > nut-upsuser@alioth-lists.debian.net> wrote: > > Hello, > > I had an idea last week: why shut everything off (in my basement) when the > power goes off (and run time goes below X minutes)? > > My idea: shutdown the big stuff first (two servers) leaving the little > stuff (switches, wireless, gateway) running for a while longer. I might get > another 30 minutes of internet that way. Let me watch a bit more streaming…. > > I’m convinced that idea is achievable with a little programming. > > Mind you, most of my power outages exceed 1 hour. > > Do you already do something similar? Do you have something you’d like to > share please? > > Thank you > > -- > Dan Langille > d...@langille.org > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser@alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser > > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser@alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser@alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser >
_______________________________________________ Nut-upsuser mailing list Nut-upsuser@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser