LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-20-2011, 10:24 AM   #1
davide123
Member
 
Registered: Jan 2010
Location: tampa bay fl
Distribution: fedora redhat 9 10 11 12 13 &14 x86_64 & i686; Peppermint, MintOne; RHEL 4 5 6, Ubuntu, SliTaz etc,
Posts: 102

Rep: Reputation: 16
Is there linux software to shutdown gracefully on low power on a ups


I would like a program that will auto shutdown my Linux machine when it detects low power or X amount of minutes remaining on UPS. I don't have NIC's in my UPS's so that's why I am asking... Not even sure it is possible for the Linux machine to detect when it switches to AUX power.
Thanks
 
Old 01-20-2011, 10:36 AM   #2
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,600

Rep: Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083
Apcupsd may do what you need, depending on what UPS model you have.

http://www.apcupsd.com/

--jeremy
 
Old 01-20-2011, 10:58 AM   #3
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,672

Rep: Reputation: 486Reputation: 486Reputation: 486Reputation: 486Reputation: 486
UPS' usually have a serial port which you connect to the (Linux) system. If the UPS fails over to battery power it'll initiate a shut down of the system. What you need is the software which closes down the system after the UPS indicates the power fail. UPS' usually have about 10 minutes autonomy. (They'd keep the system up for ten minutes at least on battery power) The autonomy depends on the UPS capacity and the system's power requirement. You should be able to set a delay before the shutdown to cope with short losses of power.

Hope this helps.

Play Bonny!
 
Old 01-20-2011, 12:41 PM   #4
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Just to add to the above, APC (in some ways the 'gold standard' at least in terms of reputation for small UPSs) have a mass of configuration options.

Quote:
Not even sure it is possible for the Linux machine to detect when it switches to AUX power.
Yesno; the UPS sends out a message when one of its alarm conditions are met, so the Linux box has just got to listen for the message. The old UPSs that I know have an RS-232 serial link to convey the information to the computer; USB is more modern, but I believe on UPSs that weigh in above the 'two hernia' level, you get a real ethernet port...

So, you need a small utility that listens on the appropriate port for a message an then reacts appropriately. This is where acpupsd comes in. There is also an acpupsd-gui program for tweaking and monitoring which works alongside acpupsd.

Note that with the APC line you can set fixed delays, remaining percentages of power as limits, and you have to be careful with this; it is very easy to think that setting, say, 10% is safe only to find that the time delay gets it to shutdown much earlier.

Also, depending on what this box is doing, think about what is a graceful shutdown. If you have a document open, which may or may not have been modified, what is the graceful action?
 
Old 01-21-2011, 08:42 AM   #5
davide123
Member
 
Registered: Jan 2010
Location: tampa bay fl
Distribution: fedora redhat 9 10 11 12 13 &14 x86_64 & i686; Peppermint, MintOne; RHEL 4 5 6, Ubuntu, SliTaz etc,
Posts: 102

Original Poster
Rep: Reputation: 16
I have APC UPS's with out NICS but do have serial. I'm guessing I need to install this service on every machine I have pluged into an APC? I have 8 and 6 APC's Trying to find a serial cable now.
 
  


Reply



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
Need advice for purchasing low power home linux server digdogger Linux - Hardware 3 07-11-2008 12:20 AM
LXer: Low-power Linux goes off-grid LXer Syndicated Linux News 0 12-09-2007 05:20 AM
LXer: Linutop v1.2: low-power Linux desktop Revisited LXer Syndicated Linux News 0 12-05-2007 01:20 PM
shutdown amarok gracefully? dasbooter Linux - Software 4 04-24-2006 03:38 PM
LXer: NCS Introduces Ultra-Compact, Low-Cost, Low-Power and Super-Quiet Set-top Server Appliance Platforms LXer Syndicated Linux News 0 01-29-2006 08:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:11 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration