Re: [Nut-upsuser] Powering off the big stuff first

2023-07-16 Thread Jim Klimov via Nut-upsuser
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


Re: [Nut-upsuser] Powering off the big stuff first

2023-07-16 Thread Arnaldo H Viegas de Lima
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 
>  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 
>>  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


Re: [Nut-upsuser] Powering off the big stuff first

2023-07-16 Thread Willcox David via Nut-upsuser
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 
>  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


Re: [Nut-upsuser] NUT start service problem

2023-07-16 Thread Michael Golub via Nut-upsuser
Hi,
I use las win version downloaded from site.
UPS Eaton 5SC1000 connected to NAS ASUSTOR with UPS server.

Michael Golub, with best regards.

From: Jim Klimov 
Sent: Sunday, July 16, 2023 9:16:41 PM
To: Michael Golub 
Cc: nut-upsuser@alioth-lists.debian.net 
Subject: Re: [Nut-upsuser] NUT start service problem

Hello, interesting to hear. What version of NUT, what way of installation on 
Windows, what sort of UPS (USB or some other)?

Asking because this info is lacking and currently there are a few variants to 
consider:

* an MSI package based on NUT v2.6.5 (last released about 9 years ago as 
"2.6.5-6"),
* results of re-integration of that codebase into current NUT master (some 
months after 2.8.0 release), with regular CI-made archives of binary build 
"installation" directories which so far lack an installer (nobody looked at it 
yet) and have some other caveats and bits of known-missing code. In particular, 
lack of the installer may be behind the lack of (privileged-mode) USB 
integration, although it is possible to use the Zadig tool to specify which 
low-level USB drivers should handle certain VendorID:ProductID hits. From 
codebase re-integration differences over the commit history I saw several ways 
iterated and changed about Windows Service registration in particular, so it is 
possible that the approach used at the time of MSI releases is different from 
the one implemented in the codebase now. Sadly so far nobody else stepped up to 
brush up the remaining parts and complete the Windows codebase integration, 
someone who would actually use Windows, UPS and NUT together to find and iron 
out the wrinkles. Help is welcome :)

See some more details and further links about this at 
https://github.com/networkupstools/nut/wiki/NUT-for-Windows

Hope this helps,
Jim Klimov


On Sun, Jul 16, 2023 at 2:49 PM Michael Golub via Nut-upsuser 
mailto:nut-upsuser@alioth-lists.debian.net>>
 wrote:
Hi
After install on Windows 11 I can't start NUT service.

Michael Golub, with best regards.
___
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


Re: [Nut-upsuser] NUT start service problem

2023-07-16 Thread Jim Klimov via Nut-upsuser
Hello, interesting to hear. What version of NUT, what way of installation
on Windows, what sort of UPS (USB or some other)?

Asking because this info is lacking and currently there are a few variants
to consider:

* an MSI package based on NUT v2.6.5 (last released about 9 years ago as
"2.6.5-6"),
* results of re-integration of that codebase into current NUT master (some
months after 2.8.0 release), with regular CI-made archives of binary build
"installation" directories which so far lack an installer (nobody looked at
it yet) and have some other caveats and bits of known-missing code. In
particular, lack of the installer may be behind the lack of
(privileged-mode) USB integration, although it is possible to use the Zadig
tool to specify which low-level USB drivers should handle certain
VendorID:ProductID hits. From codebase re-integration differences over the
commit history I saw several ways iterated and changed about Windows
Service registration in particular, so it is possible that the approach
used at the time of MSI releases is different from the one implemented in
the codebase now. Sadly so far nobody else stepped up to brush up the
remaining parts and complete the Windows codebase integration, someone who
would actually use Windows, UPS and NUT together to find and iron out the
wrinkles. Help is welcome :)

See some more details and further links about this at
https://github.com/networkupstools/nut/wiki/NUT-for-Windows

Hope this helps,
Jim Klimov


On Sun, Jul 16, 2023 at 2:49 PM Michael Golub via Nut-upsuser <
nut-upsuser@alioth-lists.debian.net> wrote:

> Hi
> After install on Windows 11 I can't start NUT service.
>
> Michael Golub, with best regards.
> ___
> 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


Re: [Nut-upsuser] Powering off the big stuff first

2023-07-16 Thread Kari Lempiäinen
Hi,

You have two options. You can run nut on those servers and modify the 
scheduling part to shut down servers after desired delay when running on 
battery. Nut can monitor ups on another server. Other way is just getting some 
way of shutting down your servers remotely from the computer running the nut.

I have implemented a schedule running down my virtual box windows server on the 
nut running linux server. You can see my configuration from this message:
https://alioth-lists.debian.net/pipermail/nut-upsuser/2023-June/013338.html

Five minutes after entering battery mode nut schedule shuts the windows server 
down.

Cheers,
Kari

From: Nut-upsuser 
 on 
behalf of Dan Langille via Nut-upsuser 
Date: Sunday, 16. July 2023 at 17.16
To: nut-upsuser@alioth-lists.debian.net 
Subject: [Nut-upsuser] Powering off the big stuff first
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


Re: [Nut-upsuser] Powering off the big stuff first

2023-07-16 Thread manuel wolfshant via Nut-upsuser
It makes perfect sense and it is perfectly doable via upssched.
https://networkupstools.org/docs/man/upssched.html

wolfy

On Sun, Jul 16, 2023 at 5:15 PM 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


Re: [Nut-upsuser] Powering off the big stuff first

2023-07-16 Thread Greg Troxel
Dan Langille via Nut-upsuser 
writes:

> 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)?

Makes sense to me.

I would say after 30s, start to shut off the "not important to keep
running" stuff.  At least for me, once the power is out even 10s, it is
almost certainly going to be 30 minutes.

I deal with this by having one UPS on a desktop computer and another for
a low power router/wifi, more or less.

___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser


[Nut-upsuser] Powering off the big stuff first

2023-07-16 Thread Dan Langille via Nut-upsuser
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] NUT start service problem

2023-07-16 Thread Michael Golub via Nut-upsuser
Hi
After install on Windows 11 I can't start NUT service.

Michael Golub, with best regards.
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser