LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 02-20-2007, 05:01 PM   #1
filburt1
Member
 
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
Member
 
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:-

http://www.apcc.com/tools/download/index.cfm

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
filburt1
Member
 
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: http://nam-en.apc.com/cgi-bin/nam_en...i=&p_topview=1
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 04:14 AM.

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