LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-08-2004, 09:50 AM   #1
koody
LQ Newbie
 
Registered: Aug 2004
Posts: 5

Rep: Reputation: 0
Question Excluding certain syslog entries


I have a server wich will be on a network as a backup server. For most of the time it will be idle, so I'd like the disks to be spun down. I'm using Debian woody, and by defult it runs exim every 15 minutes using a cron job. This causes text to be written to auth.log and syslog.

I cannot remove the cron job because I want local mail to be delivered from debconf etc. I could set the delay to something like a day, but that woudln't erase the problem.

I'm not very familiar with the syslog.conf syntax, so I'm asking for help.

Can I change to another MTA that wouldn't have this "feature" or how can I have these messages not be written in to the log. I would like other cron and auth messages to be written. Just not these.

Thanks in advance. You can find more info about this project in the wiki under Installing_woody

Last edited by koody; 08-08-2004 at 11:44 AM.
 
Old 08-08-2004, 10:17 AM   #2
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Insert this line before the relevant job in the crontab:
MAILTO=""

This will stop sending mail notifications on any subsequent jobs.
 
Old 08-08-2004, 10:30 AM   #3
koody
LQ Newbie
 
Registered: Aug 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Uuh.. Maybe I wasn't clear. The problem isn't the mail. I don't mind mail. I mind that when exim checks the queue every 15 minutes using cron, I get a logmessage, wich forces the harddisk to spin up. That bothers me.
 
Old 08-09-2004, 04:49 PM   #4
probe
LQ Newbie
 
Registered: Aug 2004
Posts: 2

Rep: Reputation: 0
I have a smiliar need to clean up syslog. I get these rows in syslog every 5 minutes
Code:
Aug 10 00:35:00 localhost CROND[10644]: (root) CMD (if [ -x /usr/bin/vnstat ] && [ `ls /var/lib/vnstat/ | wc -l` -ge 1 ]; then /usr/bin/vnstat -u; fi)
and I'd like to hide them, they are useless to me. The little program, vnstat, on the other hand is great, I'm not going to sacrifice it . My dream situation is to only have interesting stuff written in syslog - worthwhile information on every row.

I haven't figured out yet how to hide the above CRON messages in syslog, so if you have a clue, throw in a line. So far I've only tried adding ">>/dev/null 2>&1" to /etc/cron.d/vnstat where the CRON job is located at. It didn't seem to do anything (assuming cron automatically reloads cron.d files when their moddate changes).

I run Mandrake 9.2 / 2.4.22

Last edited by probe; 08-09-2004 at 04:50 PM.
 
Old 08-12-2004, 11:52 PM   #5
koody
LQ Newbie
 
Registered: Aug 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Actually that is a message from cron, so you need to edit syslog.conf and redirect cron stuff somewhere else. Problem is, I don't know how not to redirect *everything* that comes from cron, just one thing. :-(
 
Old 08-13-2004, 04:24 AM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi
for example if u have this line

cron.* /var/log/cron

this means that all ur messages from cron will redirect to /var/log/cron
so to change ur log create a different file anywhere say
/test/cron

then redirect ur output there by

cron.* /test/cron

also restart syslog service to make changes take effect now.

the problem u might face here is that these log mesag ahave a entry in logrotate.conf which keep a chweck on the size of the logs.
so u may need to do some editing

correct me if i am wrong here that even if ur backup server is running all the time,and even if it is doing no work at all
then too i think the disks do keep on spinning all the time

regards
 
  


Reply



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
/var/log/auth.log entries buehler Linux - Security 1 04-23-2005 04:45 PM
log entries robert1963 Linux - Security 1 03-28-2004 04:37 PM
concerned about log entries complus Linux - Security 6 03-08-2004 09:14 AM
Strange log entries. forand Linux - Security 7 03-25-2003 03:20 AM
question regarding log entries epeus Linux - Security 6 01-09-2003 05:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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