Previous configuration ntpd I found a sentence when I was in bed , Very impressive , I think it's very effective , It's the title :
“ I think there are several kinds of people who must not be recruited / Cut off : 1 use ntpdate Instead of ntpd People who ”
But I don't understand the specific reasons , I always think it's still useful ntpdate It's more convenient .
Today, I asked red hat for technical support , The other side's explanation is :
ntpd In the actual synchronization time is a little bit of calibration over time , Finally, the time is adjusted slowly to . and ntpdate I don't think about whether other programs will hurt , Adjust the time directly .
One is calibration time , One is adjusting the time .
Here's an image hypothesis :
linuxtone Restrict user registration 1 Hours to post .
The database server is 10:00 Fen accepted my invitation to register ;
10:03 branch ,ntpdate Change the database time to 9:35 branch ;
then 10:05 branch (9:37 branch ) I try to post , The system judges whether I will use it after one hour of registration :9:37 - 10:00
In the end, the logic of the computer is confused ...
Similar posts also have very detailed instructions on the Internet , Post it for you to see :
The jump of the clock , Sometimes it can lead to serious problems . Many applications rely on continuous clocks ?? After all , This is a common assumption , namely , The time taken is linear , Some operations , For example, database transactions , It's very common to rely on the fact that : Time doesn't jump back .
Unfortunately ,ntpdate The way to adjust time is what we call ” Jump “: After getting a time ,ntpdate Use settimeofday(2) Set system time , There are several very obvious problems :
First of all , It's not safe to do this .ntpdate The setting of depends on ntp Server security , Attackers can take advantage of some software design flaws , Take down ntp Server and make the server synchronized with it perform some consuming tasks . because ntpdate The way to do it is jump , The server that follows cannot know if an exception has occurred ( When the time is different , The only way is to take the server as the standard ).
second , It's not accurate . once ntp Server down , The server that follows it will not be able to synchronize time . Unlike the ,ntpd Not only can you calibrate the time of the computer , And can calibrate the computer clock .
Third , It's not elegant enough . Because it's a jump , Instead of making time faster or slower , Programs that depend on timing can go wrong ( for example , If ntpdate It's time to find you , You may experience two identical moments , For some applications , This is fatal ).
thus , The only point that can make time jump , It's the computer that just started up , But not when a lot of services started . The rest of the time , Ideally, use ntpd To calibrate the clock , Instead of adjusting the time on the computer clock .
NTPD In the process of synchronization with the time server , Will be able to BIOS The oscillation frequency deviation of the timer ?? Or say Local Clock The natural drift of (drift)?? recorded . So even if there's a problem with the network , This machine can still maintain a fairly accurate travel time .
##############
Finally, let me remind you to use vmware The fellow , Because the clock of the virtual machine is not very normal , Many seconds slower than normal , So test on a virtual machine ntpd It's hard to get the ideal results , That's why I was delayed for several days ..

from http://www.cnblogs.com/liuyou/archive/2012/07/29/2614330.html

ntpd and ntpdate More articles about the difference between

  1. In a distributed cluster , Set the time synchronization server , as well as ntpd And ntpdate The difference between

    When to configure time synchronization ? When the distributed cluster is configured , The configuration right now is SSH No key configuration , And then you configure time synchronization . Time synchronization is particularly important in clusters . One : Time synchronization 1. Time synchronization There has to be a unified time in the cluster If it's an intranet , ...

  2. ntpd And ntpdate The difference between

    Previous configuration ntpd I found a sentence when I was in bed , Very impressive , I think it's very effective , It's the title :“ I think there are several kinds of people who must not be recruited / Cut off : 1 use ntpdate Instead of ntpd People who ” But I don't understand the specific reasons , I always think it's still useful ntp ...

  3. Linux Time synchronization 02 ntpd、ntpdate The difference between

    Linux Time synchronization 02 ntpd.ntpdate The difference between Catalog Linux Time synchronization 02 ntpd.ntpdate The difference between [ One ] It's not safe to do this . [ Two ] It's not accurate . [ 3、 ... and ] It's not elegant enough . ntp ...

  4. 030 In a distributed cluster , Set the time synchronization server , as well as ntpd And ntpdate The difference between

    When to configure time synchronization ? When the distributed cluster is configured , The configuration right now is SSH No key configuration , And then you configure time synchronization . Time synchronization is particularly important in clusters . One : Time synchronization 1. Time synchronization There has to be a unified time in the cluster If it's an intranet , ...

  5. linux Time synchronization ,ntpd、ntpdate

    linux Time synchronization ,ntpd.ntpdate stay Windwos in , The setting of system time is very simple , interface , Easy to understand . And after setting , restart , It doesn't matter if you turn it off . The system time will be automatically saved in Bios In my clock , When you start the computer , system ...

  6. Linux Under the ntpd and ntpdate

    There is a substantial difference between the two ,ntpd In the actual synchronization time is a little bit of calibration over time , Finally, the time is adjusted slowly to . and ntpdate I don't think about whether other programs will hurt , Adjust the time directly . One is calibration , One is adjustment . in addition ntpd stay ...

  7. ntpd、ntpdate、hwclock The difference between

    hwclock --systohc Use ntpdate Update system time - Don't use it - CSDN Blog https://blog.csdn.net/suer0101/article/details/7868 ...

  8. ntpd and ntpdate

    With nothing GUI Of Ubuntu For example 1. ntpdate ntpdate yes Ubuntu Standard for distribution . Press Ubuntu14.04 Official documents of ( here ),Ubuntu When it starts , Would call ntpdate, according to Ubunt ...

  9. Linux Of NTP Configuration summary

    stay Linux In the system , In order to avoid the time deviation caused by the long-time running of the host computer , Time synchronization (synchronize) It's very necessary to have a good job .Linux Under the system , In general use ntp Services to synchronize the time of different machines .NTP It's a net ...

Random recommendation

  1. Use gulp Plug in to automatically refresh the page .

    http://itakeo.com/blog/2016/05/19/gulpreload/?none=123 Use gulp Plug in to automatically refresh the page . There's no need to change it again , Click F5 了 . The first choice is through npm inst ...

  2. 【bzoj2434- Ali's typewriter 】AC automata +fail Trees + Optimize

    http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=23083 Description Ali likes to collect all kinds of strange things , Recently he got a ...

  3. mysql insert Sentence error problem solving

    I haven't reviewed the database for a long time , I forgot mysql Keywords in ( Reserved words ), That's why I've been searching all night sql sentence in wrong , This error is hereby recorded , Lesson . I am here mysql There is one in the database called order Table of , ahhhh , Why do I give him ...

  4. Asp.net asynchronous IHttpAsyncHandler Example

    /// <summary> /// asynchronous IHttpHandler, Realized a simple statistical traffic function , /// Because it's sample code , So there's no judgment IP perhaps MAC /// </summary&g ...

  5. 【PhotoShop】 use PS Let the beautiful coffee froth

    A cup of coffee , How you can't beat Zhang ( Often bitter black coffee drinks really can't stand ! ) Get, for example, the following figure It looks good , But I always feel empty , So I took it PS It's time to practice . Finally, the rendering is as follows : Here's the production process : The first is to add coffee bubbles to the photos ...

  6. Python The way -Linux Command basis (3)

    Homework one : 1) Vertically merge user information database file and group information database file into one file /1.txt( Cover ) 2) Vertically merge user information database file and user password database file into one file /2.txt( Additional ) 3) take /1.txt./2 ...

  7. Spring data mongodb ObjectId , according to id Date condition query , Omit @CreatedDate annotation

    Have a look first ObjectId Of json structure , A very rich , Here's a unique machine code , date , Time stamp and so on , So it is strongly recommended that ID Use ObjectId type , And bring your own index Spring data mongodb annotation  @C ...

  8. Open the sandbox file iOS

    Sometimes you need to view or replace the database and other files in the sandbox to use the database So how to get the sandbox of the real machine Check out the real sandbox tutorial open Devices stay xcode In the upper navigation bar , choice window -> Devices and S ...

  9. socketserver Realization FTP

    function : 1. User encryption authentication 2. Allow multiple users to log in at the same time 3. Each user has his own home directory , You can only access your home directory 4. Disk quota for users , Each user's free space is different 5. Allow users to ftp server Switch directories at will on ...

  10. linux Set the power on to enter the command mode automatically

    1) Open the terminal , Enter the command :      su – root     2) Input password 3) Enter the following command to enter the command line mode :      init 3 4) Change the startup mode to permanent command line mode :      vi /etc ...