LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-22-2013, 06:51 PM   #1
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 750

Rep: Reputation: 156Reputation: 156
ntpd - panic


Hi, at work we run a number of RedHat servers (version 5.x I think) but I think this is a more generic question.

The maintainers of our system wanted to make a change which removes the "-g" from the ntpd startup script. Removing "-g" forces ntpd to use the default "panic threshold" of 1000s rather than allowing any old time difference to be made.

Quote:
-g
Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, ntpd will exit with a message to the system log. This option can be used with the -q and -x options. See the tinker command for other options.

This is not really something that bothers me but out of curiosity...why allow a time difference of such a huge amount? I can understand that there may be a time difference at startup or if someone manually changes the time. But the impression I got was that the time could change quite dramatically if, for example, our ntp server sent the wrong time.

I am curious if anyone could explain the rationale behind this threshold and when it would be used

Cheers
 
Old 08-22-2013, 07:33 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,698

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
I am not sure why the default threshold is set at 1000s. The value can be changed or even disabled in the ntp.conf.

-g only removes the panic threshold when ntp first starts. Originally this option was not available so instead the startup script called ntpdate first to force time to be set to any value before ntp started.

One of the benefits to ntp is that time is only increments in small amounts. Once ntp is running if there is a large time offset it assumes something must be wrong and so quits.

One of the reasons for having a pool of servers is to keep time from breaking if a single server goes astray. ntp will switch servers or use its local clock (fudge) if so configured.

I do not see any real benefit from removing the -g option.
 
Old 08-27-2013, 06:40 PM   #3
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 750

Original Poster
Rep: Reputation: 156Reputation: 156
Hi Michael, the explanation provided internally was something like "crisis management". If the NTP server goes crazy and spits out a time hours/days different to the current time, then the -g option will accept this time.

At least if -g is removed then the hit will be limited to 1000s.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/rc.d/rc.ntpd: what does it do? stf92 Slackware 32 07-27-2012 05:24 PM
ntpd seitan Linux - Software 1 11-29-2004 05:30 AM
ntpd jqcaducifer Linux - General 0 08-21-2003 11:09 PM
ntpd in RH 7.3 melissad Linux - Networking 4 04-28-2003 12:34 PM
ntpd susx Linux - Newbie 3 08-28-2001 04:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:20 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
Open Source Consulting | Domain Registration