meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
linux:ntp [2019/10/28 17:14] – niziak | linux:ntp [2019/10/28 21:10] – [Not synchronized clock] niziak | ||
---|---|---|---|
Line 31: | Line 31: | ||
Reason is: there is no possibility to set clock to past. It is possible to adjust kernel clock to slow down. | Reason is: there is no possibility to set clock to past. It is possible to adjust kernel clock to slow down. | ||
Also some AMD platform are known for big clock drifts. | Also some AMD platform are known for big clock drifts. | ||
- | You can only set times in the future, setting past times with date command will do nothing and no error will be shown. Ntpd service will correct slowly the time at small steps. It's not like in Windows | + | You can only set times in the future, setting past times with date command will do nothing and no error will be shown. Ntpd service will correct slowly the time at small steps. It's not like in Windows |
+ | |||
+ | Solution: | ||
+ | |||
+ | stop all ntp daemons, delete ''/ | ||
+ | |||
+ | <code bash> | ||
+ | # set initial adjtimex params | ||
+ | $sudo adjtimexconfig | ||
+ | Comparing clocks (this will take 70 sec)...done. | ||
+ | Adjusting system time by -9.67758 sec/day to agree with CMOS clock...done. | ||
+ | |||
+ | # print current ticks | ||
+ | sudo adjtimex -p | ||
+ | |||
+ | mode: 0 | ||
+ | | ||
+ | frequency: 5766574 | ||
+ | | ||
+ | | ||
+ | | ||
+ | time_constant: | ||
+ | precision: 1 | ||
+ | tolerance: 32768000 | ||
+ | tick: 9998 | ||
+ | raw time: 1572283011s 863855330ns = 1572283011.863855330 | ||
+ | |||
+ | # Slow down clock, to do not wait few days for correction | ||
+ | adjtimex -tick 9000 | ||
+ | |||
+ | # Watch how it works | ||
+ | adjtimex -compare | ||
+ | </ | ||
+ | |||
+ | When clock reach good value. Start ntpd. Wait some time and observe ' | ||
+ | Finally it is good to store correct time to RTC '' | ||