Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/var/log/message too big
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Lord Aragorn
n00b
n00b


Joined: 19 Jan 2005
Posts: 44

PostPosted: Wed Sep 27, 2006 8:12 pm    Post subject: /var/log/message too big Reply with quote

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
View user's profile Send private message
AaronPPC
Guru
Guru


Joined: 29 May 2005
Posts: 522
Location: Tucson, AZ

PostPosted: Wed Sep 27, 2006 9:28 pm    Post subject: Reply with quote

Point your Portage at app-admin/logrotate. That will get your logs under control.
_________________
--Aaron
Back to top
View user's profile Send private message
Lord Aragorn
n00b
n00b


Joined: 19 Jan 2005
Posts: 44

PostPosted: Wed Sep 27, 2006 9:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
tobr
Guru
Guru


Joined: 29 May 2006
Posts: 330

PostPosted: Wed Sep 27, 2006 10:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
Lord Aragorn
n00b
n00b


Joined: 19 Jan 2005
Posts: 44

PostPosted: Fri Sep 29, 2006 4:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
tobr
Guru
Guru


Joined: 29 May 2006
Posts: 330

PostPosted: Sun Oct 01, 2006 2:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
Lord Aragorn
n00b
n00b


Joined: 19 Jan 2005
Posts: 44

PostPosted: Sun Oct 01, 2006 7:59 pm    Post subject: Reply with quote

thanks a lot tobr, i'll try it now.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum