LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-09-2013, 05:21 AM   #1
carsonb
LQ Newbie
 
Registered: Jul 2013
Posts: 2

Rep: Reputation: Disabled
Disable daily ntpdate update mail


Because I've forgot to adjust my internal clock for daylight savingtime too often in the past, I've installed ntpdate and let it run daily by anacron. However, now I get this kind of email delivered every day:

Code:
Date: Tue,  9 Jul 2013 10:02:50 +0200 (CEST)
From: Anacron <root@********.net>
To: root@********.net
Subject: Anacron job 'cron.daily' on *****

/etc/cron.daily/ntpdate:
 9 Jul 10:02:50 ntpdate[14595]: adjust time server 213.239.154.12 offset -0.004679 sec
I'd like to only receive messages from cron if something has gone wrong, not a daily status update. I could change the anacrontab to deliver all messages to /dev/null, but then I'd get no warnings at all. Is there a way to control the granularity of anacron status updates ?
Thanks in advance!
 
Old 07-09-2013, 07:34 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,817

Rep: Reputation: 610Reputation: 610Reputation: 610Reputation: 610Reputation: 610Reputation: 610
Assuming ntpdate writes to STDOUT not STDERR. in /etc/cron.daily/ntpdate, append the following to the line:

Code:
 > /dev/null
Note the lack of a '2' .. errors will still be mailed.
 
Old 07-09-2013, 07:56 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,392

Rep: Reputation: 1652Reputation: 1652Reputation: 1652Reputation: 1652Reputation: 1652Reputation: 1652Reputation: 1652Reputation: 1652Reputation: 1652Reputation: 1652Reputation: 1652
In most cases the preferred method would be to run ntp instead of ntpdate. ntp is a daemon so it isn't necessary to run a cron job. In addition it constantly updates both the system and hardware clocks and adjusts them for drift.
 
Old 07-09-2013, 11:07 AM   #4
carsonb
LQ Newbie
 
Registered: Jul 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
In most cases the preferred method would be to run ntp instead of ntpdate. ntp is a daemon so it isn't necessary to run a cron job. In addition it constantly updates both the system and hardware clocks and adjusts them for drift.
Well, yes, but I'm not in a dire need for perfect time synchronization; that would only increase the load on the ntp pool.

Quote:
Originally Posted by AlucardZero View Post
Assuming ntpdate writes to STDOUT not STDERR. in /etc/cron.daily/ntpdate, append the following to the line:

Code:
 > /dev/null
Note the lack of a '2' .. errors will still be mailed.
Thanks for the suggestion. I'll try that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Clamav update using clanscan -d daily.cvd Runge_Kutta Linux - Software 2 03-03-2010 03:00 PM
[SOLVED] /etc/cron.daily update errors qwertyjjj Linux - Newbie 2 08-13-2009 08:16 PM
SuSE 10.0 YaST online update daily bunkenburg SUSE / openSUSE 2 03-02-2006 05:21 PM
disable logging for ntpdate rubella Linux - Newbie 1 12-15-2005 03:37 PM
ntpdate + firewall + no update countcobolt Linux - Networking 3 12-09-2003 03:50 PM


All times are GMT -5. The time now is 04:17 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration