|
|
| Next: [News] [Rival] Microsoft Research Lead Quits |
| Author |
Message |
riggor9999 External

Since: Oct 11, 2009 Posts: 4
|
Posted: Sun Oct 11, 2009 8:10 am Post subject: UPS / SLES 10 question Archived from groups: alt>comp>linux, others (more info?) |
|
|
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 |
|
| Back to top |
|
 |
Moe Trin External

Since: Aug 12, 2004 Posts: 1732
|
Posted: Sun Oct 11, 2009 5:10 pm Post subject: Re: UPS / SLES 10 question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Sun, 11 Oct 2009, in the Usenet newsgroup alt.os.linux.suse, in article
<hashvv$euh$1@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 |
|
| Back to top |
|
 |
riggor9999 External

Since: Oct 11, 2009 Posts: 4
|
Posted: Sun Oct 11, 2009 8:33 pm Post subject: Re: UPS / SLES 10 question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
"Moe Trin" <ibuprofin DeleteThis @painkiller.example.tld> wrote in message
news:slrnhd4luj.a44.ibuprofin@compton.phx.az.us...
> On Sun, 11 Oct 2009, in the Usenet newsgroup alt.os.linux.suse, in article
> <hashvv$euh$1@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 ....... |
|
| Back to top |
|
 |
DenverD External

Since: Jul 26, 2009 Posts: 19
|
Posted: Mon Oct 12, 2009 4:10 am Post subject: Re: UPS / SLES 10 question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
>> 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...lectedT
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 |
|
| Back to top |
|
 |
riggor9999 External

Since: Oct 11, 2009 Posts: 4
|
Posted: Mon Oct 12, 2009 7:17 am Post subject: Re: UPS / SLES 10 question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
"DenverD" <spam.trap DeleteThis @SOMEwhere.dk> wrote in message
news:4ad2d78d$0$56781$edfadb0f@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...lectedT
>
> 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. |
|
| Back to top |
|
 |
Marcel Bruinsma External

Since: Oct 01, 2009 Posts: 5
|
Posted: Mon Oct 12, 2009 9:10 am Post subject: Re: UPS / SLES 10 question [Login to view extended thread Info.] Archived from groups: alt>os>linux>suse (more info?) |
|
|
Am Montag, 12. Oktober 2009 13:17, riggor9999 a écrit :
> pwrstate -pwrfail -delay 60 -active on -cmd
> /etc/pwrstatd-powerfail.sh -duration 1 -shutdown on
>
> 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.
As the command (-cmd ...) will run as root, perhaps it
could suspend the daemon by sending it a STOP signal.
When command is finished, it sends a CONT signal to
the daemon. The duration would effectively become
infinite.
--
printf -v email $(echo \ 155 141 162 143 145 154 142 162 165 151 \
156 163 155 141 100 171 141 150 157 157 056 143 157 155|tr \ \\\\)
# Live every life as if it were your last! # |
|
| Back to top |
|
 |
Marcel Bruinsma External

Since: Oct 01, 2009 Posts: 5
|
Posted: Mon Oct 12, 2009 9:10 am Post subject: Re: UPS / SLES 10 question [Login to view extended thread Info.] Archived from groups: alt>comp>linux, others (more info?) |
|
|
Am Montag, 12. Oktober 2009 13:17, riggor9999 a écrit :
> what are other people using if you don't want to / can't use
> the vendor's software.
http://www.networkupstools.org/
The Cyber Power 1500AVR is mentioned in
http://www.networkupstools.org/compat/stable.html
--
printf -v email $(echo \ 155 141 162 143 145 154 142 162 165 151 \
156 163 155 141 100 171 141 150 157 157 056 143 157 155|tr \ \\\\)
# Live every life as if it were your last! # |
|
| Back to top |
|
 |
DenverD External

Since: Jul 26, 2009 Posts: 19
|
Posted: Mon Oct 12, 2009 10:10 am Post subject: Re: UPS / SLES 10 question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
amazing, you bought a UPS unit provides one minute of backup power!
take/send it back.
--
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 |
|
| Back to top |
|
 |
riggor9999 External

Since: Oct 12, 2009 Posts: 2
|
Posted: Mon Oct 12, 2009 12:50 pm Post subject: Re: UPS / SLES 10 question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Oct 12, 9:38 am, DenverD <spam.t....TakeThisOut@SOMEwhere.dk> wrote:
> amazing, you bought a UPS unit provides one minute of backup power!
> take/send it back.
>
> --
> 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
you can keep saying it over and over ... but it is still incorrect.
The UPS is 1500VA / 900 watts. My load is 550 watts ... for about 15
to 18 minutes of battery power.
The issue is with the software from the vendor. I have spoken to them
to day and the confirmed the limitation around the runtime of the
scripts prior to shutdown. They will try to update the software.
In the meantime - I can use NUT, or try to add my script to the system
shutdown, return it for another make / model. |
|
| Back to top |
|
 |
riggor9999 External

Since: Oct 12, 2009 Posts: 2
|
Posted: Mon Oct 12, 2009 1:31 pm Post subject: Re: UPS / SLES 10 question [Login to view extended thread Info.] Archived from groups: alt>os>linux>suse (more info?) |
|
|
On Oct 12, 8:05 am, Marcel Bruinsma <m....TakeThisOut@nomail.afraid.org> wrote:
> Am Montag, 12. Oktober 2009 13:17, riggor9999 a écrit :
>
> > pwrstate -pwrfail -delay 60 -active on -cmd
> > /etc/pwrstatd-powerfail.sh -duration 1 -shutdown on
>
> > 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.
>
> As the command (-cmd ...) will run as root, perhaps it
> could suspend the daemon by sending it a STOP signal.
> When command is finished, it sends a CONT signal to
> the daemon. The duration would effectively become
> infinite.
>
> --
> printf -v email $(echo \ 155 141 162 143 145 154 142 162 165 151 \
> 156 163 155 141 100 171 141 150 157 157 056 143 157 155|tr \ \\\\)
> # Live every life as if it were your last! #
Creative approach - I will have to play with it / test it |
|
| Back to top |
|
 |
Günther External

Since: Oct 10, 2006 Posts: 8
|
Posted: Mon Oct 12, 2009 3:10 pm Post subject: Re: UPS / SLES 10 question [Login to view extended thread Info.] Archived from groups: alt>comp>linux, others (more info?) |
|
|
riggor9999 wrote:
> 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.
Assuming that the "shutdown command" calls initd with "init 0": why not
letting initd handle your database or whatever you want to terminate
cleanly prior to halting the system? Configured correctly with sufficient
timeouts init will wait for the application to terminate prior to moving
on for the next process.
It is has been mentioned previously that one has to distinguish between
initiating the shutdown and finally cutting power. The latter is an
internal function of the UPS and will depend on the size of the battery.
If the hardware can not provide for sufficient time to do a clean
shutdown it is not suitable for the application. As the battery degrades
in use an undersized UPS will become even more problematic over time.
Günther |
|
| Back to top |
|
 |
riggor9999 External

Since: Oct 11, 2009 Posts: 4
|
Posted: Tue Oct 13, 2009 9:30 am Post subject: Re: UPS / SLES 10 question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
"Moe Trin" <ibuprofin.RemoveThis@painkiller.example.tld> wrote in message
news:slrnhd7k3p.5gd.ibuprofin@compton.phx.az.us...
> On Sun, 11 Oct 2009, in the Usenet newsgroup alt.os.linux.suse, in article
> <hattgi$g07$1@news.eternal-september.org>, riggor9999 wrote:
>
>>"Moe Trin" <ibuprofin.RemoveThis@painkiller.example.tld> wrote
>
<SNIP>
The software is very simple and straight forward. Actions for power fail,
and actions for low battery. The actions include send email, run a script,
shutdown, turn off the ups, etc. The confirmed limitation is that the
program will only wait one minute max after kicking off an action script
before starting shutdown ... for both powerfail and low battery.
I called Cyber support in the US - they understood and agreed that the max
time allowed to run a script before starting the shutdown sequence is too
short / unrealistic and should be increased. I am surprised no one has
complained about this before.
I understand what you are saying. I had played / tested / changed config
with the PowerPanel software for powerfail and low battery ... and now
looking into NUT. I would prefer to use the PowerPanel software, as it is
designed for their UP and it has a very small footprint.
They have forwarded my detailed request to the Linux developer ... and they
expect to release an update in a week or two.
In the meantime - this is a technical sandbox at home - running two Oracle
databases with SAP. It is not mission critical ... but it is the season for
wind storms here and we lose power quite often. I am trying avoid having to
do restores in the event of physical or logical data corruption.
What I am now going to test is at powerfail - run the script but do not
shutdown the system, and at low battery - do not run the script - but go
ahead and shutdown. This should accomplish what I need. |
|
| Back to top |
|
 |
Moe Trin External

Since: Aug 12, 2004 Posts: 1732
|
Posted: Tue Oct 13, 2009 7:40 pm Post subject: Re: UPS / SLES 10 question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Tue, 13 Oct 2009, in the Usenet newsgroup alt.os.linux.suse, in article
<hb1veb$e7o$1@news.eternal-september.org>, riggor9999 wrote:
>I called Cyber support in the US - they understood and agreed that
>the max time allowed to run a script before starting the shutdown
>sequence is too short / unrealistic and should be increased. I am
>surprised no one has complained about this before.
As mentioned, this is the first time I've seen the program. The
software that has been available in the past doesn't seem to have
the problem. Based on the minimal capability of their program
(example, the lack of master/slave capability over the network[1]), I
suspect their products are more for the home user, where it would not
enocunter a database with eleventy-thousand files open, or similar.
>I would prefer to use the PowerPanel software, as it is designed for
>their UP and it has a very small footprint.
Smaller - yes, but other than that, I'm not sure what benefits it
offers over NUT and others where you actually get source code.
>In the meantime - this is a technical sandbox at home - running two
>Oracle databases with SAP. It is not mission critical ... but it is
>the season for wind storms here and we lose power quite often.
We get some freak thunderstorms once/twice a year that have been known
to blow down a half mile of powerline (microbursts exist!), and a lot
of the power distribution in residential areas is underground (partly
for that reason, partly for looks). Thus, our major problem is drunks
missing a turn (or making one when they shouldn't) and driving through
the surface mounted transformers. We get some momentary outages, but
normally when power fails for more than a few seconds, it's going to
be out for an hour or more.
>I am trying avoid having to do restores in the event of physical or
>logical data corruption.
Other than UPS and decent filesystem, the normal solution is RAID of
some kind, but most databases are not very tolerant of unplanned
shutdowns.
>What I am now going to test is at powerfail - run the script but do
>not shutdown the system, and at low battery - do not run the script -
>but go ahead and shutdown. This should accomplish what I need.
The concern I'd have about that (other than the deep discharge effects
on the batteries) is the (more or less) remote chance of consecutive
power outages leaving you with insufficient charge in the batteries
to do a clean shutdown the second or third time.
Old guy
[1] Master system has the UPS control cables, slave is merely powered
by the same UPS, and receives a shutdown command (if needed) over the
network. At home, eight systems are running off 3 UPS. |
|
| Back to top |
|
 |
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
| |
|
|