Technology Questions

Go Back   Technology Questions > Software Questions > Operating System Questions > Linux

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 10-11-2009, 05:10 AM
riggor9999
Newsgroup Contributor
 
Posts: n/a
UPS / SLES 10 question

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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 10-11-2009, 05:10 AM
  #2 (permalink)  
Old 10-11-2009, 03:10 PM
Moe Trin
Newsgroup Contributor
 
Posts: n/a
Re: UPS / SLES 10 question

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 10-11-2009, 05:40 PM
riggor9999
Newsgroup Contributor
 
Posts: n/a
Re: UPS / SLES 10 question


"Moe Trin" <ibuprofin@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 .......


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 10-12-2009, 12:20 AM
DenverD
Newsgroup Contributor
 
Posts: n/a
Re: UPS / SLES 10 question

>> 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/pro...mageI=#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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 10-12-2009, 04:20 AM
riggor9999
Newsgroup Contributor
 
Posts: n/a
Re: UPS / SLES 10 question


"DenverD" <spam.trap@SOMEwhere.dk> wrote in message
news:4ad2d78d$0$56781$edfadb0f@dtext02.news.tele.d k...
>>> 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/pro...mageI=#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.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #6 (permalink)  
Old 10-12-2009, 05:30 AM
Marcel Bruinsma
Newsgroup Contributor
 
Posts: n/a
Re: UPS / SLES 10 question

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! #
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #7 (permalink)  
Old 10-12-2009, 06:40 AM
DenverD
Newsgroup Contributor
 
Posts: n/a
Re: UPS / SLES 10 question

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #8 (permalink)  
Old 10-12-2009, 11:30 AM
Günther Schwarz
Newsgroup Contributor
 
Posts: n/a
Re: UPS / SLES 10 question

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #9 (permalink)  
Old 10-12-2009, 12:50 PM
riggor9999
Newsgroup Contributor
 
Posts: n/a
Re: UPS / SLES 10 question

On Oct 12, 9:38*am, DenverD <spam.t...@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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #10 (permalink)  
Old 10-12-2009, 06:00 PM
Moe Trin
Newsgroup Contributor
 
Posts: n/a
Re: UPS / SLES 10 question

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@painkiller.example.tld> wrote


>> Boy, you're sure supplying a lot of details here.
>>
>> 1. Which CyberPower UPS


>CP1500AVRLCD ... does that help?


We're primarily using APCs, but there are at least four CP1500 AVRs
(or the "Best Buy" equivalent GS-1500AVR which is a rebadged version
of the CP1500) in one of the server rooms. I'm not the UPS guy (I'm
running APCs at home), so I can't tell you how ours are run, but they
seem to be running NUT (http://www.networkupstools.org/)

>> 2. Which software?


>powerpanel-1.1.2-0.i386.rpm but it works with all their models ...
>does that help?


Never saw that before - this might be OK for stand-alones, the NUT
version is substantially more capable and better documented.

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


No - GNOME is not really designed for this (we don't waste CPU cycles
running fsckin' GUIs on our mostly headless servers).

>As I said in my original post the CyberPower powerpanel software is
>limited. It has to shutdown conditions ... low battery and powerfail.


which is fine - but the one minute maximum is not very well explained.

# How much time in seconds to take script running for event of Power
# Failure. The allowed range is 0 ~ 60. Default is 0 sec.
powerfail-duration = 0

and

# How much time in seconds to take script running for event of
# Battery Low. The allowed range is 0 ~ 60. Default is 0 sec.
lowbatt-duration = 0

Zero seconds to run scripts doesn't seem correct. Have you actually
dinked around with this on a test box? Normally, I'd expect one or
more timers started with a power failure (one to send mail to the
hell-desk in case they didn't notice the power fail, one to actually
initiate a shutdown), with the timer causing a script to run to shut
down userland stuff. AFTER that has occurred, I'd expect the system
to run the inittab 'pf' event to shut down the system, AND AS PART OF
THAT event, send a command to the UPS to shut down in N seconds
(giving time to finish the system shutdown). The documentation with
this program sucks mightily, and it's not clear exactly what these
various delays in the pwrstatd.conf file mean.

>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.


I would recommend looking at the NUT programs (nut-2.4.1 looks to be
the current version). For this program, you might look into running
your application shutdown script some amount of time after "powerfail"
and NOT shutting the system itself down,

# Allow Daemon to shutdown system for event of Power Failure.
# The allowed options are yes and no. Default is yes.
powerfail-shutdown = yes

(change that to 'powerfail-shutdown = no') and then running
'/sbin/shutdown -h now &' (or '/sbin/telinit 0' - your choice) at the
very end of your script. But what do these variables do?

# The necessary time in seconds for system shutdown.
# The UPS will turn power off when this time is expired.
# The allowed range is 0 ~ 3600. Default is 600 sec.(10 min.)
shutdown-sustain = 600

# Daemon will turn UPS power off once it ask system shutdown cause by
# a power event. Allowed options are yes and no. Default is yes.
turn-ups-off = yes

>I was looking for what others have done.


I suspect that most are running different software that doesn't have
this limitation, or at least has more understandable documentation.
(Yes, I realize that CyberPower Systems is in Taiwan, and English is
not a primary language there, but they _do_ have an office in
Shakopee - a Minneapolis suburb and ought to be able to find someone
who can write better.)

Old guy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #11 (permalink)  
Old 10-13-2009, 06:30 AM
riggor9999
Newsgroup Contributor
 
Posts: n/a
Re: UPS / SLES 10 question


"Moe Trin" <ibuprofin@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@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.





Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #12 (permalink)  
Old 10-13-2009, 05:50 PM
Moe Trin
Newsgroup Contributor
 
Posts: n/a
Re: UPS / SLES 10 question

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
eno****er 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IE8 Question bobster Internet Explorer 2 03-29-2009 08:18 AM
IE7 question Willy Internet Explorer 3 05-06-2007 07:54 AM
vista genral question and ultimate question pedro g Windows Vista 7 02-09-2007 08:45 PM
One more question.. Bucko21 Windows Vista 2 02-01-2007 09:15 AM
Dual boot system question and family deal discount question Betatesterzz Windows Vista 4 01-31-2007 06:30 AM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 04:33 AM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0