Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Removing CRON messages from syslog
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
kruel
n00b
n00b


Joined: 08 Apr 2004
Posts: 52

PostPosted: Wed Apr 21, 2004 7:15 am    Post subject: Removing CRON messages from syslog Reply with quote

I use vixie-cron and syslog-ng. My syslog is getting filled with CRON messages every minute. Is there a way to set syslog-ng so that it ignores the CRON messages?

Thank you.
Back to top
View user's profile Send private message
thm
Tux's lil' helper
Tux's lil' helper


Joined: 15 Dec 2003
Posts: 77
Location: Munich

PostPosted: Wed Apr 21, 2004 9:33 am    Post subject: Reply with quote

For some reason, the latest version installs an /etc/crontab containing the the following line:
Code:
* * * * *    root    test -x /usr/sbin/run-crons && /usr/sbin/run-crons

As you can see, this gets called every minute and produces a log entry. But the script only checks whether there are hourly, dailty, etc. cron scripts.
IMHO it's enough to do that every hour. So replace the first asterisk by something like 1 or 5. be sure that it differs from correponding number of the lline removing the lastrun/cron.hourly flag.You can also suppress those log messages completely by redirecting the output of run-crons to /dev/null
_________________
Thomas


Last edited by thm on Wed Apr 21, 2004 2:04 pm; edited 3 times in total
Back to top
View user's profile Send private message
30726
Veteran
Veteran


Joined: 24 Sep 2003
Posts: 1501

PostPosted: Wed Apr 21, 2004 11:29 am    Post subject: Reply with quote

I put this in my syslog-ng.conf

Code:
# filter those damn cron lines
filter f_not_cron { not facility(cron); };

log { source(src); filter(f_not_cron); destination(messages); };
Back to top
View user's profile Send private message
nevynxxx
Veteran
Veteran


Joined: 12 Nov 2003
Posts: 1123
Location: Manchester - UK

PostPosted: Mon Apr 26, 2004 3:22 pm    Post subject: Reply with quote

On a similar line, I want to remove the "i've just run..." messages but not any error messages from syslog, so the filter above wont work. Does anyone know where I can find the level's that cron logs on?

The man pages and website are useless for this.
_________________
My Public Key

Wanted: Instructor in the art of Bowyery
Back to top
View user's profile Send private message
unstable_geek
Tux's lil' helper
Tux's lil' helper


Joined: 01 Mar 2003
Posts: 102
Location: In my own happy place

PostPosted: Fri Jun 18, 2004 2:23 pm    Post subject: Reply with quote

Does this help?
_________________
I hate my sig
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