LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   ntpd - panic (https://www.linuxquestions.org/questions/linux-general-1/ntpd-panic-4175474330/)

timl 08-22-2013 06:51 PM

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

michaelk 08-22-2013 07:33 PM

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.

timl 08-27-2013 06:40 PM

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.


All times are GMT -5. The time now is 04:57 AM.