View previous topic :: View next topic |
Author |
Message |
Fukai Tux's lil' helper
Joined: 05 Jul 2006 Posts: 149 Location: São Paulo, Brazil
|
Posted: Sat Oct 14, 2006 12:43 pm Post subject: /var/log/acpid big (~900mb) |
|
|
Hi,
my acpid log is really big, it is filled with:
Code: |
[Sat Oct 14 09:39:23 2006] notifying client 9715[102:409]
[Sat Oct 14 09:39:23 2006] completed event "processor CPU0 00000080 00000000"
[Sat Oct 14 09:39:26 2006] received event "processor CPU0 00000080 00000000"
[Sat Oct 14 09:39:26 2006] notifying client 9052[0:0]
[Sat Oct 14 09:39:26 2006] notifying client 9715[102:409]
[Sat Oct 14 09:39:26 2006] completed event "processor CPU0 00000080 00000000"
[Sat Oct 14 09:39:46 2006] received event "processor CPU0 00000080 00000000"
[Sat Oct 14 09:39:46 2006] notifying client 9052[0:0]
[Sat Oct 14 09:39:46 2006] notifying client 9715[102:409]
[Sat Oct 14 09:39:46 2006] completed event "processor CPU0 00000080 00000000"
|
So, you can see it is a lot of output how i can stop this verbose log? |
|
Back to top |
|
|
Hagar Guru
Joined: 11 Feb 2003 Posts: 445
|
Posted: Sat Oct 14, 2006 1:18 pm Post subject: |
|
|
Isn't there anything in /etc/conf.d/acpid about that? |
|
Back to top |
|
|
Fukai Tux's lil' helper
Joined: 05 Jul 2006 Posts: 149 Location: São Paulo, Brazil
|
Posted: Sat Oct 14, 2006 1:49 pm Post subject: |
|
|
Uhh... nothing
Code: |
# cat /etc/conf.d/acpid
cat: /etc/conf.d/acpid: No such file or directory
|
Is this no good?
And my /etc/acpi/events/default is blank becase that lines
Code: |
event=.*
action=/etc/acpi/default.sh %e
|
Put a lot of output. (I removed it early because the source of log lines is from it... but i dont really know what they do,
yes this is stupid, but a 900mb is stupid too ) |
|
Back to top |
|
|
Hagar Guru
Joined: 11 Feb 2003 Posts: 445
|
Posted: Sat Oct 14, 2006 2:31 pm Post subject: |
|
|
It seems there is no default conf.d file, but we can fix that and create one ourself.
There is no flag that controls verbosity, but we can specify a logfile.
Code: | # cat /etc/conf.d/acpid
ACPID_OPTIONS="-l /dev/null" |
This will stop it from logging
If some app depends on the logfile you should consider something like app-admin/logrotate
Edit: didn't notice this before, but acpid has a logrotate USE flag |
|
Back to top |
|
|
redwood Guru
Joined: 27 Jan 2006 Posts: 306
|
Posted: Fri Dec 01, 2006 5:37 pm Post subject: /var/log/acpid grows until no more disk space |
|
|
After a recent "emerge -puvD world" my amd64 laptop keeps running out of space on /var/log
because of /var/log/acpid
I initially installed acpid following the Gentoo Guide:
http://www.gentoo.org/doc/en/power-management-guide.xml?style=printable
It all worked fine. But now I get the following messages in /var/log/acpid
head -n 25 /var/log/acpid
[Fri Dec 1 12:29:14 2006] starting up
[Fri Dec 1 12:29:14 2006] 10 rules loaded
[Fri Dec 1 12:29:14 2006] received event "processor CPU0 00000080 00000000"
[Fri Dec 1 12:29:14 2006] executing action "/etc/acpi/default.sh processor CPU0 00000080 00000000"
[Fri Dec 1 12:29:14 2006] BEGIN HANDLER MESSAGES
[Fri Dec 1 12:29:14 2006] END HANDLER MESSAGES
[Fri Dec 1 12:29:14 2006] action exited with status 0
[Fri Dec 1 12:29:14 2006] completed event "processor CPU0 00000080 00000000"
[Fri Dec 1 12:29:16 2006] received event "processor CPU0 00000080 00000000"
[Fri Dec 1 12:29:16 2006] executing action "/etc/acpi/default.sh processor CPU0 00000080 00000000"
[Fri Dec 1 12:29:16 2006] BEGIN HANDLER MESSAGES
[Fri Dec 1 12:29:16 2006] END HANDLER MESSAGES
[Fri Dec 1 12:29:16 2006] action exited with status 0
[Fri Dec 1 12:29:16 2006] completed event "processor CPU0 00000080 00000000"
[Fri Dec 1 12:29:18 2006] received event "processor CPU0 00000080 00000000"
[Fri Dec 1 12:29:18 2006] executing action "/etc/acpi/default.sh processor CPU0 00000080 00000000"
[Fri Dec 1 12:29:18 2006] BEGIN HANDLER MESSAGES
[Fri Dec 1 12:29:18 2006] END HANDLER MESSAGES
[Fri Dec 1 12:29:18 2006] action exited with status 0
[Fri Dec 1 12:29:18 2006] completed event "processor CPU0 00000080 00000000"
[Fri Dec 1 12:29:19 2006] client connected from 10968[102:408]
[Fri Dec 1 12:29:19 2006] 1 client rule loaded
[Fri Dec 1 12:29:20 2006] received event "processor CPU0 00000080 00000000"
[Fri Dec 1 12:29:20 2006] notifying client 10968[102:408]
[Fri Dec 1 12:29:20 2006] executing action "/etc/acpi/default.sh processor CPU0 00000080 00000000"
[ad infinitum]
Basically every other second apid is writing to /var/log/acpid until it grows to 1.7G and then I have no more space
left on /var for X logins, etc.
How do I fix this? |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Fri Dec 01, 2006 5:56 pm Post subject: |
|
|
merged above post here. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
NightMonkey Guru
Joined: 21 Mar 2003 Posts: 356 Location: Philadelphia, PA
|
Posted: Tue May 01, 2007 10:32 am Post subject: |
|
|
Hagar wrote: | It seems there is no default conf.d file, but we can fix that and create one ourself.
There is no flag that controls verbosity, but we can specify a logfile.
Code: | # cat /etc/conf.d/acpid
ACPID_OPTIONS="-l /dev/null" |
This will stop it from logging
If some app depends on the logfile you should consider something like app-admin/logrotate
Edit: didn't notice this before, but acpid has a logrotate USE flag |
Finding this saved me further head scratching - thanks. This was posted long ago, but the acpid ebuild still hasn't been updated to create this file. Did anyone file a bug on this? If not, I'll file one. _________________
|
|
Back to top |
|
|
kds66 Apprentice
Joined: 17 Oct 2006 Posts: 166 Location: Manaus, Brazil
|
Posted: Sun Mar 02, 2008 10:07 am Post subject: |
|
|
Quote: | # cat /etc/conf.d/acpid
ACPID_OPTIONS="-l /dev/null" |
This does not seem to work any more with acpi-1.0.6-r1:
Quote: | anlashok log # /etc/init.d/acpid restart
* Caching service dependencies ... [ ok ]
* Stopping acpid ... [ ok ]
* Starting acpid ...
/usr/sbin/acpid: invalid option -- l
Usage: acpid [OPTIONS]
-c, --confdir Set the configuration directory.
-d, --debug Increase debugging level (implies -f).
-e, --eventfile Use the specified file for events.
-f, --foreground Run in the foreground.
-g, --socketgroup Set the group on the socket file.
-m, --socketmode Set the permissions on the socket file.
-s, --socketfile Use the specified socket file.
-S, --nosocket Do not listen on a UNIX socket (overrides -s).
-v, --version Print version information.
-h, --help Print this message. |
The -l option has disappeared. Is there another way to reduce/disable acpid loggging? |
|
Back to top |
|
|
El_Presidente_Pufferfish Veteran
Joined: 11 Jul 2002 Posts: 1179 Location: Seattle
|
Posted: Sun Mar 02, 2008 2:57 pm Post subject: |
|
|
would logrotate help here? |
|
Back to top |
|
|
kds66 Apprentice
Joined: 17 Oct 2006 Posts: 166 Location: Manaus, Brazil
|
Posted: Sun Mar 02, 2008 4:52 pm Post subject: |
|
|
Quote: | would logrotate help here? |
I would rather avoid writing to the log file at all. |
|
Back to top |
|
|
kds66 Apprentice
Joined: 17 Oct 2006 Posts: 166 Location: Manaus, Brazil
|
Posted: Fri Mar 07, 2008 6:41 pm Post subject: |
|
|
I discovered that the "-l" option disappeared because acpid now writes to syslog. With syslog-ng the output can be filtered easily. |
|
Back to top |
|
|
thomasg n00b
Joined: 19 Jan 2006 Posts: 6
|
Posted: Thu Apr 17, 2008 6:05 pm Post subject: |
|
|
I have to revive this thread again: as the -l option is out, the only way preventing acpid from spamming stdout seems to be syslog.
Is there really no clean way to avoid this for the few people out there that don't want a logger? |
|
Back to top |
|
|
Joseph K. Guru
Joined: 07 Jun 2006 Posts: 436 Location: Sydney, Australia
|
Posted: Sat Jun 28, 2008 11:37 am Post subject: |
|
|
thomasg wrote: | I have to revive this thread again: as the -l option is out, the only way preventing acpid from spamming stdout seems to be syslog.
Is there really no clean way to avoid this for the few people out there that don't want a logger? |
This will presumably not be considered 'clean', but what about editing start() in /etc/init.d/acpid to redirect its output to /dev/null? |
|
Back to top |
|
|
axelmasok Apprentice
Joined: 08 Oct 2003 Posts: 171
|
Posted: Fri Sep 12, 2008 4:41 am Post subject: |
|
|
Did anyone actually solve this? Please share. |
|
Back to top |
|
|
axelmasok Apprentice
Joined: 08 Oct 2003 Posts: 171
|
Posted: Sun Sep 14, 2008 11:48 pm Post subject: |
|
|
OK then. Has anyone have a default.sh acpi script that references "thermal" acpi calls so I don't get a constant stream of:
Code: |
Sep 15 09:45:52 laptop64 acpid: received event "thermal_zone TZ0 00000081 00000000"
Sep 15 09:45:52 laptop64 acpid: notifying client 10213[102:443]
Sep 15 09:45:52 laptop64 acpid: notifying client 10603[0:0]
Sep 15 09:45:52 laptop64 acpid: executing action "/etc/acpi/default.sh thermal_zone TZ0 00000081 00000000"
Sep 15 09:45:52 laptop64 acpid: action exited with status 2
Sep 15 09:45:52 laptop64 acpid: completed event "thermal_zone TZ0 00000081 00000000"
Sep 15 09:45:52 laptop64 acpid: received event "thermal_zone TZ0 00000081 00000000"
Sep 15 09:45:52 laptop64 acpid: notifying client 10213[102:443]
Sep 15 09:45:52 laptop64 acpid: notifying client 10603[0:0]
Sep 15 09:45:52 laptop64 acpid: executing action "/etc/acpi/default.sh thermal_zone TZ0 00000081 00000000"
Sep 15 09:45:52 laptop64 acpid: action exited with status 2
Sep 15 09:45:52 laptop64 acpid: completed event "thermal_zone TZ0 00000081 00000000"
Sep 15 09:45:52 laptop64 acpid: received event "thermal_zone TZ0 00000081 00000000"
Sep 15 09:45:52 laptop64 acpid: notifying client 10213[102:443]
Sep 15 09:45:52 laptop64 acpid: notifying client 10603[0:0]
Sep 15 09:45:52 laptop64 acpid: executing action "/etc/acpi/default.sh thermal_zone TZ0 00000081 00000000"
Sep 15 09:45:52 laptop64 acpid: action exited with status 2
Sep 15 09:45:52 laptop64 acpid: completed event "thermal_zone TZ0 00000081 00000000"
Sep 15 09:46:36 laptop64 acpid: received event "thermal_zone TZ0 00000081 00000000"
Sep 15 09:46:36 laptop64 acpid: notifying client 10213[102:443]
Sep 15 09:46:36 laptop64 acpid: notifying client 10603[0:0]
Sep 15 09:46:36 laptop64 acpid: executing action "/etc/acpi/default.sh thermal_zone TZ0 00000081 00000000"
Sep 15 09:46:36 laptop64 acpid: action exited with status 2
Sep 15 09:46:36 laptop64 acpid: completed event "thermal_zone TZ0 00000081 00000000"
|
I have got this in there which doesn't work:
First part of default.sh...
Code: | #!/bin/sh
# /etc/acpi/default.sh
# Default acpi script that takes an entry for all actions
set $*
group=${1%%/*}
action=${1#*/}
device=$2
id=$3
value=$4
log_unhandled() {
logger "ACPI event unhandled: $*"
}
case "$group" in
thermal_zone)
;; # don't care..fan seems to work
"thermal_zone TZ0 00000081 00000000")
;; # Damn log files
thermal_zone TZ0 00000081 00000000)
;; # SOAB
|
|
|
Back to top |
|
|
axelmasok Apprentice
Joined: 08 Oct 2003 Posts: 171
|
Posted: Tue Sep 16, 2008 4:43 am Post subject: |
|
|
Seriously, anyone?
Just copy and paste your own one. |
|
Back to top |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Wed Feb 18, 2009 2:03 am Post subject: |
|
|
Has anyone found a better solution to this than writing a custom filter in syslog-ng?
For what it's worth, this is how I changed my syslog-ng.conf:
Code: | # Commented these two lines for acpid filter below
#log { source(src); destination(messages); };
#log { source(src); destination(console_all); };
# acpid filter
destination d_acpid { file ("/dev/null"); };
filter f_acpid { match("acpid"); };
filter f_not_acpid { not match("acpid"); };
log { source(src); filter (f_acpid); destination (d_acpid); };
log { source(src); filter (f_not_acpid); destination (messages); }; |
|
|
Back to top |
|
|
axelmasok Apprentice
Joined: 08 Oct 2003 Posts: 171
|
Posted: Wed Feb 18, 2009 2:30 am Post subject: |
|
|
This one is still unresolved.
I managed to come across a bug ticket for gentoo where someone created a patch and ebuild for acpid to supress the acpid message. This worked for me but was still getting logger messages.
I am trying your syslog settings to see if they work for me too.
Cheers |
|
Back to top |
|
|
axelmasok Apprentice
Joined: 08 Oct 2003 Posts: 171
|
Posted: Wed Feb 18, 2009 2:31 am Post subject: |
|
|
Nope, still getting these:
Code: | Feb 18 13:30:40 laptop64 logger: ACPI event unhandled: thermal_zone TZ0 00000081 00000000
Feb 18 13:30:40 laptop64 logger: ACPI event unhandled: thermal_zone TZ0 00000081 00000000
Feb 18 13:30:40 laptop64 logger: ACPI event unhandled: thermal_zone TZ0 00000081 00000000
Feb 18 13:30:40 laptop64 logger: ACPI event unhandled: thermal_zone TZ0 00000081 00000000
Feb 18 13:31:05 laptop64 logger: ACPI event unhandled: thermal_zone TZ0 00000081 00000000
Feb 18 13:31:05 laptop64 logger: ACPI event unhandled: thermal_zone TZ0 00000081 00000000
Feb 18 13:31:05 laptop64 logger: ACPI event unhandled: thermal_zone TZ0 00000081 00000000
Feb 18 13:31:05 laptop64 logger: ACPI event unhandled: thermal_zone TZ0 00000081 00000000
Feb 18 13:31:05 laptop64 logger: ACPI event unhandled: thermal_zone TZ0 00000081 00000000
Feb 18 13:31:05 laptop64 logger: ACPI event unhandled: thermal_zone TZ0 00000081 00000000 |
What a PITA. Log files full of crap still. |
|
Back to top |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Wed Feb 18, 2009 3:52 pm Post subject: |
|
|
The syslog config I sent was bad... use this one instead:
Code: | # commented for acpid filter below
#log { source(src); destination(messages); };
# acpid filter
filter f_not_acpid { not match("acpid"); };
log { source(src); filter (f_not_acpid); destination (messages); }; |
The syslog-ng was causing /dev/null to change permissions with the previous rule I sent.
BTW - If you want to ignore the other "ACPI event unhandled" messages you need to edit your /etc/acpi/default.sh:
Code: | log_unhandled() {
# comment next line to turn off event unhandled logging
#logger "ACPI event unhandled: $*"
} |
|
|
Back to top |
|
|
axelmasok Apprentice
Joined: 08 Oct 2003 Posts: 171
|
Posted: Fri Feb 20, 2009 5:36 am Post subject: |
|
|
mikegpitt wrote: |
The syslog-ng was causing /dev/null to change permissions with the previous rule I sent.
|
So, I think I know the reason why my system is unusable now...
Have been running Gentoo since 2004. The last 2 days of trying to revive portage have failed on my laptop and I have finally snapped and have given up on Gentoo.
I was getting all sorts of errors (/dev/null was one of them). Portage is down, emerge is down, dbus down, udev down....
I have purchased a removable hard drive and have resorted to Ubuntu Ultimate of all things. What a nightmare. |
|
Back to top |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Fri Feb 20, 2009 2:17 pm Post subject: |
|
|
axelmasok wrote: | mikegpitt wrote: |
The syslog-ng was causing /dev/null to change permissions with the previous rule I sent.
|
So, I think I know the reason why my system is unusable now...
Have been running Gentoo since 2004. The last 2 days of trying to revive portage have failed on my laptop and I have finally snapped and have given up on Gentoo.
I was getting all sorts of errors (/dev/null was one of them). Portage is down, emerge is down, dbus down, udev down....
I have purchased a removable hard drive and have resorted to Ubuntu Ultimate of all things. What a nightmare. | Yikes! Sorry if the syslog config caused you so many problems
It really shouldn't have made your system unusable though. Applications that had superuser access (portage, dbus, udev) should have still been able to write to /dev/null. Either way, if you change the rule, and subsequently reboot your machine or change the permissions back on /dev/null to what they are suppose to be (crwxrwxrwx) things will go back to normal. The problem was that syslog-ng changed the permissions so users could not read/write to /dev/null. |
|
Back to top |
|
|
|