LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 07-31-2009, 02:31 PM   #1
Biggen
Member
 
Registered: Sep 2004
Location: Panama City Beach FL
Distribution: Slackware 12.2
Posts: 199

Rep: Reputation: 31
Power Outage Monitoring??


How are you guys monitoring power outages? My servers are on UPS's but they only last 30 minutes or so before they drain those batteries. I'd like to write (or find) some type of script that will somehow monitor a device (that is NOT on backup power) and when that device fails, I would get a text message and e-mail to my blackberry telling me power is out.

My hope, is that I could SSH in if a power failure occurs and I could shut the boxes down safely.

Thoughts?
 
Old 07-31-2009, 02:38 PM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,017

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
My hope, is that I could SSH in if a power failure occurs and I could shut the boxes down safely.
If you have a "proper" UPS, it should communicate the power status to your PC, which should take appropriate action automatically.

Please SEARCH or see /start here: http://linux.die.net/man/8/upsmon

There are other utilities as well. "You-know-who is your friend". No need to re-invent the wheel
 
Old 07-31-2009, 02:44 PM   #3
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,009
Blog Entries: 5

Rep: Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787
What kind of UPS do you use? If they're individual to the servers they may have built in facilities for notifying systems that power is down and allow you to use that notification for doing an automatic graceful shutdown of the server.

An example would be this one for the APC UPS:
http://www.apcupsd.org/

A simple ping test would tell you if servers are unreachable. If you have multiple servers that are unreachable that weren't on UPS you could have each of them page you (send email to your cell phone so it shows up as text message). Seeing loss of ping on multiple servers would be an indication something has gone wrong.

Of course you'd have to insure your path into the remote console (e.g. KVM, network switch etc...) was also on battery protection or you wouldn't be able to get in. Here again you could script it so that the servers on UPS are the ones doing the ping tests of the other servers and have them shutdown automatically if they see multiple other servers already down.
 
Old 07-31-2009, 03:49 PM   #4
Biggen
Member
 
Registered: Sep 2004
Location: Panama City Beach FL
Distribution: Slackware 12.2
Posts: 199

Original Poster
Rep: Reputation: 31
I didn't even think of using my APC as the thing I could monitor.

I don't have the cable that it comes with so I will have to order it from them. UPSmon looks intersting...
 
Old 07-31-2009, 04:34 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
FWIW, I'm also using apcupsd for this.
 
Old 07-31-2009, 04:58 PM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,017

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
I didn't even think of using my APC as the thing I could monitor [SNIP] UPSmon looks intersting...
Linux can be quite surprising, in a good way.

Most problems have already been met, and (mostly) resolved, by those with more urgent needs than ours.

To be honest, I don't even have a UPS, but it looks like you are now on the right track, so I'm out of this thread. Happy configuring!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
power outage blackmamba11 Linux - Server 1 12-03-2007 11:51 AM
power outage jbzy3000 Linux - General 2 02-24-2005 09:11 PM
Power Outage horror Hampster Mandriva 5 01-13-2005 08:38 PM
Reboot after power outage oigeli Linux - General 1 12-02-2004 07:10 AM
Power Outage notslim General 30 08-28-2003 03:47 AM


All times are GMT -5. The time now is 03:55 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration