Vladimir I. Umnov
2007-Jan-31 13:35 UTC
[Nut-upsuser] Additional server eralier shutdown condition
Is it possible to shutdown earlier by certain conditions: by battery level and estimated by UPS runtime. In APCUPSD this done by config options "BATTERYLEVEL" "MINUTES". By what condition NUT shutdown server? How to disable UPS shutdown?
Rob MacGregor
2007-Jan-31 15:06 UTC
[Nut-upsuser] Additional server eralier shutdown condition
On 1/31/07, Vladimir I. Umnov <umnov@kirov.ertelecom.ru> wrote:> Is it possible to shutdown earlier by certain conditions: by battery > level and estimated by UPS runtime. > In APCUPSD this done by config options "BATTERYLEVEL" "MINUTES".As specified in the FAQ, see the man page for upssched.> By what condition NUT shutdown server?Based on the OB (on battery) and LB (low battery) signals of the UPS (AFAIK).> How to disable UPS shutdown?I'm assuming you're monitoring the UPS from a host not powered from it. See the upsmon man page about the monitor-only option (as mentioned in the README). -- Please keep list traffic on the list. Rob MacGregor Whoever fights monsters should see to it that in the process he doesn't become a monster. Friedrich Nietzsche
Vladimir I. Umnov
2007-Feb-02 08:12 UTC
[Nut-upsuser] Additional server eralier shutdown condition
Rob MacGregor ?????:> On 1/31/07, Vladimir I. Umnov <umnov@kirov.ertelecom.ru> wrote: >> Is it possible to shutdown earlier by certain conditions: by battery >> level and estimated by UPS runtime. >> In APCUPSD this done by config options "BATTERYLEVEL" "MINUTES". > > As specified in the FAQ, see the man page for upssched.No. It is not true. Documentation says: >>> Early Shutdowns ============== One thing that gets requested a lot is early shutdowns in upsmon. With upssched, you can now have this functionality. Just set a timer for some length of time at ONBATT which will invoke a shutdown command if it elapses. Just be sure to cancel this timer if you go back ONLINE before then.>>>This means that NUT with upssched set their own timer. I think this is missing functionality. I need UPS monitoring software query my UPSes (APC cannot work with many UPSes in native mode, but can do such query) for current battery level and current estimated run time each 5 seconds. And if it reaches configured value, take appropriate action. For now it stops me to choose NUT. May be I wrong and it is possible in NUT???
Charles Lepple
2007-Feb-03 03:50 UTC
[Nut-upsuser] Additional server eralier shutdown condition
On 2/2/07, Vladimir I. Umnov <umnov@kirov.ertelecom.ru> wrote:> This means that NUT with upssched set their own timer. I think this is missing functionality. > I need UPS monitoring software query my UPSes (APC cannot work with many UPSes in native mode, > but can do such query) for current battery level and current estimated run time each 5 seconds. > And if it reaches configured value, take appropriate action.You should consider that many USB UPSes will take longer than 5 seconds to update everything. Rob is still correct in that you probably want to wait for an "on battery" signal for the UPS. Then you can poll it with whatever you want, including upsc in a loop, or your own custom client. The network protocol is not difficult. There are only a few good reasons to poll the battery level while the UPS is online; namely, you did not allow it enough time to recharge before coming back online after a power failure, the battery is bad, etc. A good UPS will monitor these things during the self-test. Also, a lot of the UPSes supported by NUT will allow you to adjust the battery level at which they send the "low battery" signal. This automates your scenario somewhat. -- - Charles Lepple
Vladimir I. Umnov
2007-Feb-05 07:18 UTC
[Nut-upsuser] Additional server eralier shutdown condition
Charles Lepple ?????:> On 2/2/07, Vladimir I. Umnov <umnov@kirov.ertelecom.ru> wrote: >> This means that NUT with upssched set their own timer. I think this >> is missing functionality. >> I need UPS monitoring software query my UPSes (APC cannot work with >> many UPSes in native mode, >> but can do such query) for current battery level and current >> estimated run time each 5 seconds. >> And if it reaches configured value, take appropriate action. > > You should consider that many USB UPSes will take longer than 5 > seconds to update everything. > > Rob is still correct in that you probably want to wait for an "on > battery" signal for the UPS. Then you can poll it with whatever you > want, including upsc in a loop, or your own custom client. The network > protocol is not difficult. > > There are only a few good reasons to poll the battery level while the > UPS is online; namely, you did not allow it enough time to recharge > before coming back online after a power failure, the battery is bad, > etc. A good UPS will monitor these things during the self-test. > > Also, a lot of the UPSes supported by NUT will allow you to adjust the > battery level at which they send the "low battery" signal. This > automates your scenario somewhat.That words sounds like NUT is featureless and may be used in small enviroment. For big server rooms with many types of hardware (without distant power off capability) and with goal to run this for longest possible time NUT is very very bad for now. You should think about it. And this must be done not in drivers - it should be integrated directly into upsmon!!!
Peter Selinger
2007-Feb-05 08:30 UTC
[Nut-upsuser] Additional server eralier shutdown condition
Vladimir, as Charles already pointed out, you can do what you want by writing a few lines of shell script and arranging for the script to be called when the UPS goes on battery. # shut down when battery charge goes below $minlevel minlevel=30 # check every $interval seconds interval=5 while upsc myups@localhost ups.status | grep -qw OB; do level = `upsc myups@localhost battery.charge` if test "$level" -lt "$minlevel"; then # shutdown upsmon -c fsd fi sleep "$interval" done This should do the trick. -- Peter Vladimir I. Umnov wrote:> > Charles Lepple: > > On 2/2/07, Vladimir I. Umnov <umnov@kirov.ertelecom.ru> wrote: > >> This means that NUT with upssched set their own timer. I think this > >> is missing functionality. > >> I need UPS monitoring software query my UPSes (APC cannot work with > >> many UPSes in native mode, > >> but can do such query) for current battery level and current > >> estimated run time each 5 seconds. > >> And if it reaches configured value, take appropriate action. > > > > You should consider that many USB UPSes will take longer than 5 > > seconds to update everything. > > > > Rob is still correct in that you probably want to wait for an "on > > battery" signal for the UPS. Then you can poll it with whatever you > > want, including upsc in a loop, or your own custom client. The network > > protocol is not difficult. > > > > There are only a few good reasons to poll the battery level while the > > UPS is online; namely, you did not allow it enough time to recharge > > before coming back online after a power failure, the battery is bad, > > etc. A good UPS will monitor these things during the self-test. > > > > Also, a lot of the UPSes supported by NUT will allow you to adjust the > > battery level at which they send the "low battery" signal. This > > automates your scenario somewhat. > > That words sounds like NUT is featureless and may be used in small > enviroment. For big server rooms with many types of hardware (without > distant power off capability) and with goal to run this for longest > possible time NUT is very very bad for now. > You should think about it. And this must be done not in drivers - it > should be integrated directly into upsmon!!!