LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-16-2008, 06:27 PM   #1
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
ACPI Daemon Logs


After updating to 12.2 from 12.1 I noticed the acpid is no longer logging events to /var/log/acpid. The man page no longer describes a log location option and the associated change log makes no mention of the change. I found one blurb on the web that after version 1.06 logging is moved to /var/log/messages.

Is there any way to restore logging back to /var/log/acpid?
 
Old 12-17-2008, 12:43 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Moving to /var/log/messages means using a ('man 3 syslog') facility and priority pair. Open up acpid.c and you'll spot the facility in open_log() at line 470 (acpid-1.0.8) as LOG_DAEMON and the priorities (LOG_INFO, LOG_WARNING, et cetera) in main(). Mod the facility to read LOG_LOCALn (n being in range 0-7) meaning 8 local slots configurable in syslog.conf to chose from to log to a custom filename.

Last edited by unSpawn; 12-17-2008 at 12:44 PM.
 
Old 12-17-2008, 04:19 PM   #3
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Okay. Let me see whether I understand.

1. Modify the acpi.c source file to a specific log facility, for example, such as LOG_LOCAL7.

2. Create a diff file between the original and modified source tree.

3. Add a patch to the stock Slackware build script to modify the original source tree during compiling.

4. Recompile.

5. Modify /etc/syslog.conf: local7.* -/var/log/acpid

6. Restart the acpi daemon.

7. Check the logs.

The better solution is to convince the acpid maintainer(s) to restore the separate logging function. Why do developers change the good things that "just work."
 
Old 12-17-2008, 04:48 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Woodsman View Post
Okay. Let me see whether I understand.
Steps seem OK to me.


Quote:
Originally Posted by Woodsman View Post
Why do developers change the good things that "just work."
From a functional POV it makes sense to hand off logging to .*syslog.*: no need for the application to handle it, free TZ/UTC timestamps, central and configurable log management. Other than that I'm pretty sure that was part of a rhetorical question: else why upgrade to 12.2 when the previous release "just worked" as well?
 
Old 01-21-2009, 06:05 AM   #5
xflow7
Member
 
Registered: May 2004
Distribution: Slackware
Posts: 215

Rep: Reputation: 45
I figured out that the log for acpid moved from /var/log/acpid to the syslog, which I can deal with. But what's bugging me is the log messages are less specific.

As an example, on my Thinkpad, hitting the Sleep key or similar used to log a messages like this:

Code:
received event "ibm/hotkey HKEY 00000080 00001004"
to /var/log/acpid.

Now, that same action gives this in /var/log/messages:

Code:
logger: ACPI group ibm / action hotkey is not defined
I'm not worried about the "not defined" part because I haven't set up my events/actions yet.

The problem is that I've lost the specificity of which hotkey just got hit. So, if I didn't have my old 12.1 setup to go by (for example a fresh install on a new machine), I'd have no way of figuring out what arguments to use in the events/actions.

This strikes me as a major loss. I'm less concerned about getting /var/log/acpid back than I am about restoring the full output to /var/log/messages. So far I haven't found a way to do that.

Any ideas?
 
  


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
How to 'netstat -nat + host ' at every time a user logs into SSH daemon ? frenchn00b Linux - Server 11 05-30-2008 12:25 AM
Finding LDAP Server Logs / Application Logs in Linux arbignay Linux - Newbie 2 03-24-2008 09:54 AM
Acpi events, kernel, daemon xorg jazzor Slackware 1 01-22-2008 12:20 PM
Enable daemon to run with service daemon start,etc baddah Programming 6 12-02-2007 05:51 PM
Linux ACPI and BIOS ACPI - problem to understand and giving out bugs marisdembovskis Linux - Software 3 09-20-2007 10:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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