From: riggor9999 on 11 Oct 2009 08:10 Hello - I am running SUSE Linux Enterprise Server 10 SP1. I purchased a CyberPower UPS because 1) it was cheap, and 2) it supports Linux. The reality is the Linux software it came with for shutting down the server is primitive and very limited. The UPS is connected via USB ... and the OS does recognize the connection / the UPS. I created custom scripts that shutdown my applications and databases ... which takes about 5 minutes ... but the program provided by CyberMax (which will run my script) will only wait one minute maximum before shutting down the server. I have spent lots of time with the configuration program - but it appears the max script duration wait is 60 seconds. I have a tech support ticket open with them on how to extend the time or to have it based on sequence of scripts ... but I am still waiting for an answer. My question is ... has anyone configured SLES with UPS natively to shutdown down applications and databases, and then power down the server ... when a power loss or low battery is detected? I have looked through YaST and Control Center - but I have not seen how do this. I have scanned various HOWTOs, forums, blogs, etc ... but I have not seen the answer I am looking for. TIA -- to reply via email, remove the "nospam_" from the return address
From: Moe Trin on 11 Oct 2009 18:10 On Sun, 11 Oct 2009, in the Usenet newsgroup alt.os.linux.suse, in article <hashvv$euh$1(a)news.eternal-september.org>, riggor9999 wrote: >I purchased a CyberPower UPS because 1) it was cheap, and 2) it >supports Linux. The reality is the Linux software it came with for >shutting down the server is primitive and very limited. Boy, you're sure supplying a lot of details here. 1. Which CyberPower UPS 2. Which software? 3. Which "driver" The NUT (Network UPS Tools) software seems to be rather extensively documented. >I have spent lots of time with the configuration program - but it >appears the max script duration wait is 60 seconds. I have a tech >support ticket open with them on how to extend the time or to have >it based on sequence of scripts ... but I am still waiting for an >answer. That sounds as if you are triggering off the wrong (LOWBATTERY rather than ONBATTERY) event, but not knowing what software you are running, it's impossible to say. You'd normally start a timer off the 'ONBATTERY' event (example three minutes), recheck to see that you're still on battery, and if so, initiate the shutdown (if not, cancel the timer, and go on with life). One assumes you sized the UPS so that the battery can carry the system for ten-twenty minutes. The 'LOWBATTERY' event _usually_ means that the UPS is running out of steam, and is going to die "soon", so if that event occurs before you've shut down, either you've let the battery get to low (age, insufficient recharge time), or your delay before starting shutdown is to long. Old guy
From: riggor9999 on 11 Oct 2009 20:33 "Moe Trin" <ibuprofin(a)painkiller.example.tld> wrote in message news:slrnhd4luj.a44.ibuprofin(a)compton.phx.az.us... > On Sun, 11 Oct 2009, in the Usenet newsgroup alt.os.linux.suse, in article > <hashvv$euh$1(a)news.eternal-september.org>, riggor9999 wrote: > >>I purchased a CyberPower UPS because 1) it was cheap, and 2) it >>supports Linux. The reality is the Linux software it came with for >>shutting down the server is primitive and very limited. > > Boy, you're sure supplying a lot of details here. > > 1. Which CyberPower UPS CP1500AVRLCD ... does that help? > 2. Which software? powerpanel-1.1.2-0.i386.rpm but it works with all their models ... does that help? > 3. Which "driver" It's conneted via USB - it seems both the powerpanel software and PowerManager 2.14 are using the native SUSE drivers ... does that help? > > The NUT (Network UPS Tools) software seems to be rather extensively > documented. Thanks for the observation. >>I have spent lots of time with the configuration program - but it >>appears the max script duration wait is 60 seconds. I have a tech >>support ticket open with them on how to extend the time or to have >>it based on sequence of scripts ... but I am still waiting for an >>answer. > > That sounds as if you are triggering off the wrong (LOWBATTERY > rather than ONBATTERY) event, but not knowing what software > you are running, it's impossible to say. You'd normally start a > timer off the 'ONBATTERY' event (example three minutes), recheck to > see that you're still on battery, and if so, initiate the shutdown > (if not, cancel the timer, and go on with life). One assumes you > sized the UPS so that the battery can carry the system for ten-twenty > minutes. The 'LOWBATTERY' event _usually_ means that the UPS is > running out of steam, and is going to die "soon", so if that event > occurs before you've shut down, either you've let the battery get to > low (age, insufficient recharge time), or your delay before starting > shutdown is to long. As I said in my original post the CyberPower powerpanel software is limited. It has to shutdown conditions ... low battery and powerfail. The issue with the software is that you can specify easily enough a script to run for each condtion, and how long to wait before running each script .... BUT ... the problem is that the script can run for a max of one minute before powerpanel issues the shutdown command. I need 5 minutes. As I said - I have a ticket open with the software vendor. My question is ... what is the best way to run my script and then have the system shutdown. I looked at the gnome PowerManager 2.14 settings - and it does not allow you to specify scripts when it sees a power fail or low battery. It only offers sleep/standby, hibernate or shutdown ... geared for laptop users. I could specify my script to always run when shutting down i.e. /etc/init.d/rc*.d scripts, or I could add it to the /etc/init.d/powerfail scripts ... so when PowerManager does sense low battery or powerfail .. it will shut down ... and my scripts will run when shutting down. I was looking for what others have done. Thanks for your feedback / reply .......
From: DenverD on 12 Oct 2009 03:15 >> 1. Which CyberPower UPS > CP1500AVRLCD ... does that help? yes that helps, because with it (and google) i downloaded and read the manual from http://www.cyberpowersystems.com/products/management-software/ppl.html?selectedTabId=documents&imageI=#tab-box mostly i wanted to see how anyone could possibly find folks to buy a UPS which provides only ONE MINUTE of battery backup...i can't imagine anyone who would buy such! and, i see that you looked at their EXAMPLE ----quote------------ pwrstate -pwrfail -delay 60 -active on -cmd /etc/pwrstatd-powerfail.sh -duration 1 -shutdown on ----end quote------------ and must have assumed their sixty second delay was _the_ only delay available....when, in fact you _can_ specify a 60, 300, 600 (or any value you want) second delay between power failure and commanding a system shutdown (assuming your UPS has sufficient battery power for whatever you specify) -- DenverD (Linux Counter 282315) via Thunderbird 2.0.0.23 (20090817), KDE 3.5.7 "release 72-11", openSUSE Linux 10.3, 2.6.22.19-0.4-default #1 SMP i686 athlon
From: riggor9999 on 12 Oct 2009 07:17
"DenverD" <spam.trap(a)SOMEwhere.dk> wrote in message news:4ad2d78d$0$56781$edfadb0f(a)dtext02.news.tele.dk... >>> 1. Which CyberPower UPS >> CP1500AVRLCD ... does that help? > > yes that helps, because with it (and google) i downloaded and read > the manual from > http://www.cyberpowersystems.com/products/management-software/ppl.html?selectedTabId=documents&imageI=#tab-box > > mostly i wanted to see how anyone could possibly find folks to buy a > UPS which provides only ONE MINUTE of battery backup...i can't imagine > anyone who would buy such! > > and, i see that you looked at their EXAMPLE > ----quote------------ > pwrstate -pwrfail -delay 60 -active on -cmd /etc/pwrstatd-powerfail.sh > -duration 1 -shutdown on > ----end quote------------ > > and must have assumed their sixty second delay was _the_ only delay > available....when, in fact you _can_ specify a 60, 300, 600 (or any > value you want) second delay between power failure and commanding a > system shutdown (assuming your UPS has sufficient battery power for > whatever you specify) > The delay you mention is the delay between the time power fails and the time for the script to kick off. There is no issue there. You did not quote the supporting text ... ---- begin quote ---- pwrstate -pwrfail -delay 60 -active on -cmd /etc/pwrstatd-powerfail.sh -duration 1 -shutdown on As above setting, it will take 1 second to run a shell script /etc/pwrstatd-powerfail.sh and shutdown system since utility power has failure for 1 minute. ---- end quote ---- The problem is the duration variable ... which can only be between 0 and 60 seconds ... which is the length of time you must specify the powerfail script (or any other script you specify) will take to run before the system shuts down. The details are better documented in the /etc/pwerstatd.conf file. This is not documented in the specs / manuals ... so I did not discover this until after I installed the software. The manual does not state the duration limit of 0 to 60 seconds for duration. So - when I specify duration of 300 using the example above, what happens when the power fails is that it takes one minute after the power fails for the script to kick off. The script kicks off, and the shutdown command waits for 60 seconds max (not the 300 I specified), and then proceeds to shutdown ... regardless if the specified script is running or completed. Again - thanks for your feedback / reply - but again it is not addressing my original question .... which is basically what are other people using if you don't want to / can't use the vendor's software. Thanks. |