LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-23-2006, 09:08 AM   #1
JSLayton
Member
 
Registered: Apr 2005
Location: Warrior, AL
Distribution: Slackware 10.1, Fedora Core 4
Posts: 128

Rep: Reputation: 15
apcupsd logging


I'm using apcupsd to manage an APC SmartUPS 700. Is there a way that I can setup a log to where it will log when the power blinks, goes out, etc., but keep the log file small, to where it will only get so large before it starts trimming the beginning of the file back off?

Thanks in advance.
 
Old 02-23-2006, 10:32 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
You can manage logfiles independently of the application using 'logrotate'. See the man page for details.

--- rod.
 
Old 02-23-2006, 10:39 AM   #3
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 64
Quote:
Originally Posted by JSLayton
I'm using apcupsd to manage an APC SmartUPS 700. Is there a way that I can setup a log to where it will log when the power blinks, goes out, etc., but keep the log file small, to where it will only get so large before it starts trimming the beginning of the file back off?

Thanks in advance.
Don't know how they do it in Slackware but in Debian I get a mail to my user account each time it goes on UPS and when the power comes back also it automatically logs to /var/log/apcupsd.events which does not seem overly big you may want to check for similar options for your package.

Code:
>$ ls -l /var/log/apcupsd.events
-rw-r--r--  1 root root 8.4K 2006-02-23 12:09 /var/log/apcupsd.events
 
Old 02-23-2006, 11:15 AM   #4
JSLayton
Member
 
Registered: Apr 2005
Location: Warrior, AL
Distribution: Slackware 10.1, Fedora Core 4
Posts: 128

Original Poster
Rep: Reputation: 15
What about power spikes, brownouts, etc.??? Are these automatically logged in the apcupsd.events file as well??
 
Old 02-23-2006, 11:48 AM   #5
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 64
Quote:
Originally Posted by JSLayton
What about power spikes, brownouts, etc.??? Are these automatically logged in the apcupsd.events file as well??
Looks like it does the brownouts if the 1 second outages in my log are any indication I don't see anything for spikes though.

Code:
>$ grep -i power /var/log/apcupsd.events
Thu Jan 05 02:57:37 AST 2006  Power failure.
Thu Jan 05 02:57:39 AST 2006  Power is back. UPS running on mains.
Wed Jan 18 01:39:49 AST 2006  Power failure.
Wed Jan 18 01:39:50 AST 2006  Power is back. UPS running on mains.
Wed Jan 18 20:05:05 AST 2006  Power failure.
Wed Jan 18 20:05:17 AST 2006  Power is back. UPS running on mains.
Wed Feb 01 06:13:28 AST 2006  Power failure.
Wed Feb 01 06:13:29 AST 2006  Power is back. UPS running on mains.
Fri Feb 10 09:54:18 AST 2006  Power failure.
Fri Feb 10 09:54:19 AST 2006  Power is back. UPS running on mains.
Wed Feb 15 07:49:34 AST 2006  Power failure.
Wed Feb 15 07:49:35 AST 2006  Power is back. UPS running on mains.
Sat Feb 18 05:54:03 AST 2006  Power failure.
Sat Feb 18 05:54:04 AST 2006  Power is back. UPS running on mains.
Tue Feb 21 05:25:24 AST 2006  Power failure.
Tue Feb 21 05:25:24 AST 2006  Power is back. UPS running on mains.
Wed Feb 22 17:28:20 AST 2006  Power failure.
Wed Feb 22 17:28:21 AST 2006  Power is back. UPS running on mains.
 
Old 02-23-2006, 12:06 PM   #6
JSLayton
Member
 
Registered: Apr 2005
Location: Warrior, AL
Distribution: Slackware 10.1, Fedora Core 4
Posts: 128

Original Poster
Rep: Reputation: 15
Excellent, that is all I needed to know. Thank you.
 
  


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
apcupsd problem JSLayton Linux - Software 1 01-24-2006 10:38 AM
Trying to install apcupsd. Carpinus Linux - Software 5 08-10-2005 08:19 PM
apcupsd gui? PowerMatt Linux - Software 1 09-06-2004 06:14 PM
I have a problema using APCUPSD Dapernia Linux - Hardware 0 07-21-2003 04:46 PM
gui for apcupsd tatwell Linux - Software 2 07-14-2003 02:23 PM


All times are GMT -5. The time now is 09:13 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