Re: [Nut-upsuser] upsmon shutdown based on Time since power fail.
Citeren Richard Chapman : This sounds like one way to do it. If I do it this way - do you know whether the file: /etc/killpower will be created before the shut-down is issued (as it would if the battery low event occurs). If not - the UPS may not be shut down - and therefore the system may not start up again if the power returns before the battery is completely flat. I guess if the flag file isn't created - then we could run a short script to create it - then issue the shut-down Does that sound right to you? Indeed - if we do write a short script - we could do the delay in the script - somehow test whether we are still on battery - and if so - issue the shut-down immediately. Don't do this. As written in the FAQ, in some cases you may wish/need to use 'upssched' to start shutting down your systems before the UPS indicates the battery is low. In that case, you probably want to call 'upsmon -c fsd' instead, which will initiate a shutdown on the upsmon master (in your case, your server). This means that you will have to configure the upsmon on the server (FINALDELAY) to allow for enough time for your clients to shutdown. This will put your master at risk in case of repeated power failures however, so don't overdo this. Best regards, Arjen -- Please keep list traffic on the list ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] upsmon shutdown based on Time since power fail.
Hi I am sorry, but i can not answer any of your technical NUT questions, i just wrote with an idea that might or might not work. As for starting the machine if power returns, then i can think of some remote power management that can turn the power on/off to the machine and then sit between the UPS and the machine(s). WAKE on LAN might be an option too. JonB On 22/05/2009, at 03.07, Richard Chapman wrote: Thanks Jon This sounds like one way to do it. If I do it this way - do you know whether the file: /etc/killpower will be created before the shut-down is issued (as it would if the battery low event occurs). If not - the UPS may not be shut down - and therefore the system may not start up again if the power returns before the battery is completely flat. I guess if the flag file isn't created - then we could run a short script to create it - then issue the shut-down Does that sound right to you? Indeed - if we do write a short script - we could do the delay in the script - somehow test whether we are still on battery - and if so - issue the shut-down immediately. Out of interest - do you know what the ups parameter: battery.runtime: 120 Means - and where might it be documented? Thanks Jon Richard. Jon Bendtsen wrote: On 20/05/2009, at 12.11, Richard Chapman wrote: For various reasons - I have been trying to get my Desktops and/or servers to shut-down a fixed time after a power fail - or better still a fixed time - or a low battery whichever comes first. [cut] Is there another parameter somewhere - probably in upsmon - which would allow me to specify a shut-down after (say) 3 minutes running on battery regardless of battery status? In the upsmon.conf file you use NOTIFYCMD and ONBATT to execute a shutdown $time Then you use a ONLINE to execute a -c to cancel a shutdown if the power returns. JonB ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] upsmon shutdown based on Time since power fail.
Thanks Jon This sounds like one way to do it. If I do it this way - do you know whether the file: /etc/killpower will be created before the shut-down is issued (as it would if the battery low event occurs). If not - the UPS may not be shut down - and therefore the system may not start up again if the power returns before the battery is completely flat. I guess if the flag file isn't created - then we could run a short script to create it - then issue the shut-down Does that sound right to you? Indeed - if we do write a short script - we could do the delay in the script - somehow test whether we are still on battery - and if so - issue the shut-down immediately. Out of interest - do you know what the ups parameter: battery.runtime: 120 Means - and where might it be documented? Thanks Jon Richard. Jon Bendtsen wrote: On 20/05/2009, at 12.11, Richard Chapman wrote: For various reasons - I have been trying to get my Desktops and/or servers to shut-down a fixed time after a power fail - or better still a fixed time - or a low battery whichever comes first. [cut] Is there another parameter somewhere - probably in upsmon - which would allow me to specify a shut-down after (say) 3 minutes running on battery regardless of battery status? In the upsmon.conf file you use NOTIFYCMD and ONBATT to execute a shutdown $time Then you use a ONLINE to execute a -c to cancel a shutdown if the power returns. JonB ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] upsmon shutdown based on Time since power fail.
On 20/05/2009, at 12.11, Richard Chapman wrote: For various reasons - I have been trying to get my Desktops and/or servers to shut-down a fixed time after a power fail - or better still a fixed time - or a low battery whichever comes first. [cut] Is there another parameter somewhere - probably in upsmon - which would allow me to specify a shut-down after (say) 3 minutes running on battery regardless of battery status? In the upsmon.conf file you use NOTIFYCMD and ONBATT to execute a shutdown $time Then you use a ONLINE to execute a -c to cancel a shutdown if the power returns. JonB ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser