View previous topic :: View next topic |
Author |
Message |
Lord Aragorn n00b
Joined: 19 Jan 2005 Posts: 44
|
Posted: Wed Sep 27, 2006 8:12 pm Post subject: /var/log/message too big |
|
|
My /var/log/message files is aboug 2G and almost all the lines are from the acx driver.
how can I filter this messages? |
|
Back to top |
|
|
AaronPPC Guru
Joined: 29 May 2005 Posts: 522 Location: Tucson, AZ
|
Posted: Wed Sep 27, 2006 9:28 pm Post subject: |
|
|
Point your Portage at app-admin/logrotate. That will get your logs under control. _________________ --Aaron |
|
Back to top |
|
|
Lord Aragorn n00b
Joined: 19 Jan 2005 Posts: 44
|
Posted: Wed Sep 27, 2006 9:56 pm Post subject: |
|
|
logratate is not what i want, i want to filter this messages and as far I know logrotate just move and compres. |
|
Back to top |
|
|
tobr Guru
Joined: 29 May 2006 Posts: 330
|
Posted: Wed Sep 27, 2006 10:30 pm Post subject: |
|
|
Lord Aragorn wrote: | logratate is not what i want, i want to filter this messages and as far I know logrotate just move and compres. |
Which system logger are you using?
At least syslog-ng has filtering capabilities (you can filter program name, facility and even the message itself by regexps). But you should really rotate your logs, as every log file will grow endlessly if it isn't (if you filter it, it will only grow slower). |
|
Back to top |
|
|
Lord Aragorn n00b
Joined: 19 Jan 2005 Posts: 44
|
Posted: Fri Sep 29, 2006 4:56 pm Post subject: |
|
|
Quote: | But you should really rotate your logs, as every log file will grow endlessly if it isn't (if you filter it, it will only grow slower). |
that's true, but first I need to know how to filter the messages from acx driver.
Quote: | At least syslog-ng has filtering capabilities (you can filter program name, facility and even the message itself by regexps). |
Can you explain me how I do it?
Thanks |
|
Back to top |
|
|
tobr Guru
Joined: 29 May 2006 Posts: 330
|
Posted: Sun Oct 01, 2006 2:32 pm Post subject: |
|
|
Lord Aragorn wrote: | Quote: | But you should really rotate your logs, as every log file will grow endlessly if it isn't (if you filter it, it will only grow slower). |
that's true, but first I need to know how to filter the messages from acx driver.
Quote: | At least syslog-ng has filtering capabilities (you can filter program name, facility and even the message itself by regexps). |
Can you explain me how I do it?
Thanks |
First you need something characteristic about the log entries of the acx driver. Let's assume the acx driver always prepends its entries with "acx:". Then you must make a destination in your syslog-ng.conf: Code: | destination messages { file("/var/log/messages"); }; |
and a filter: Code: | filter f_no_acx { not match("^acx:"); }; |
and finally a log statement: Code: | log { source(src); filter(f_no_acx); destination(messages); }; |
This would log everything except lines that start with "acx:" to /var/log/messages. It is not complete and will most probably lack features you need, but it should show you the concept of filtering with syslog-ng. Try to modify your existing setup. For more information about possible filters, destinations, etc. see the excellent man page and for examples see /usr/share/doc/syslog-ng-${your_version}. |
|
Back to top |
|
|
Lord Aragorn n00b
Joined: 19 Jan 2005 Posts: 44
|
Posted: Sun Oct 01, 2006 7:59 pm Post subject: |
|
|
thanks a lot tobr, i'll try it now. |
|
Back to top |
|
|
|