Sync time on Debian

[Server] Sync time on Debian

Background:
One of my VM system has slower time problem for years, the time runs several seconds slow every day. I didn't really concern about it until recently I setup a tracking service where the database is located on another server. It becomes critical for both servers has a synced time.

Environment:
The system with timing issue runs Debian 9.

Solution:
Setup a NTP client service on the target OS.

Steps:

sudo apt-get update
sudo apt-get install ntp

How do I change the sync frequency?
ntpd doesn't sync time periodically the way you think it does, ntpd syncs the time and tells the system how fast it's drifting away from "true" time, the system then adjusts its clock frequency to properly track "true" time. Within a day most systems are tracking to within 5ms of the reference.

Does it work for me?
Yes it works perfectly.

Leave a Comment

This post is created on September 05, 2020 and last updated on January 22, 2024