Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
SUSE / openSUSE This Forum is for the discussion of Suse Linux.


  Search this Thread
Old 02-20-2007, 05:01 PM   #1
Registered: Mar 2004
Distribution: SUSE Linux 10.1 (Intel, 32-bit)
Posts: 45

Rep: Reputation: 15
Getting power events

My SuSE Linux 10.1 system is connected to an APC battery backup, which it seems to detect as a generic battery. Is it possible to determine programatically (command line, PHP, C++, etc.) the power state of the system, meaning determine if it's running on AC power or the battery backup?

My ultimate objective is to have it send me a panic e-mail when the power goes out, and show the power state of the system on a web page through PHP (remember PHP can execute commands and read files as necessary). The system and all the necessary Internet connectivity is on the same battery backup, so it always stays on for a few minutes during a power failure.

Thanks for any help.
Old 02-20-2007, 05:22 PM   #2
Jon Briggs
Registered: Aug 2006
Distribution: openSUSE 11.1 and pupeee
Posts: 90

Rep: Reputation: 15
APC psus come with good software for that using a com link and a auto shutdown/monitor utility, i just had a quick look on there site:-

That was a model picked at random, so they do do linux software go and download that.
Old 02-20-2007, 05:54 PM   #3
Registered: Mar 2004
Distribution: SUSE Linux 10.1 (Intel, 32-bit)
Posts: 45

Original Poster
Rep: Reputation: 15
Unfortunately, mine only has a USB interface, and it appears their software doesn't support USB at this time:


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
LXer: Linux Networx partners with CEI to power 2X visualization power of ... LXer Syndicated Linux News 0 04-26-2006 03:03 AM
set iBook to automatically power-up after power failure peachy Other *NIX 4 04-19-2006 12:44 PM
Power Failure On AC power ONLY Gateway 5300 marti35 Linux - Laptop and Netbook 1 05-22-2005 10:14 AM
Enabling power save/power management/cpu freq scaling features for a Debian system zero79 Debian 0 12-19-2004 01:17 PM
Power Management(sysfs) /sys/power/state mavrick613 Linux - General 0 05-24-2004 03:04 PM > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 03:29 PM.

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