18 votes

Force chrony time check

If chronyd isn't already running, a command similar to 'ntpdate pool.ntp.org' could be (since version 1.30): chronyd -q 'server pool.ntp.org iburst' If it's already running and it has some servers ...
Arlion's user avatar
  • 628
9 votes

Ntpd on local network - Preventing clock drift causing high offsets

A driftfile records the frequency of the local clock, and is a good thing to have to accurately discipline it. Ubuntu /etc/ntp.conf has a driftfile by default. Appending iburst to the server line ...
John Mahowald's user avatar
8 votes

Red hat Linux + TIME ZONE CONFIGURATION + details from clock file

With the introduction of RHEL 7 the timezone is managed through systemd, which provides a custom utility to change the timezone: timedatectl To list all available time zones: timedatectl list-...
HBruijn's user avatar
  • 80.2k
6 votes
Accepted

Red hat Linux + TIME ZONE CONFIGURATION + details from clock file

So the "correct" way to set the clock (at least prior to RHEL 7) is to edit /etc/sysconfig/clock and then run tzdata-update which will then update /etc/localtime; you've just done that step manually.
bodgit's user avatar
  • 4,771
6 votes
Accepted

hwclock: Cannot access the Hardware Clock via any known method

The problem seems to be connected to clocksource, check available_clocksource: $ cat /sys/devices/system/clocksource/clocksource0/available_clocksource tsc hpet acpi_pm Based on answer to "What does ...
Tombart's user avatar
  • 2,193
5 votes

Ntpd on local network - Preventing clock drift causing high offsets

Your lack of a relation between your NTP server's clock time and the real-world UTC time could be the root of your problem. If your NTP server does not have multiple real-world sources (regardless of ...
Paul Gear's user avatar
  • 4,477
4 votes

Completely disable Date and Time sync in a Hyper-V VM

How about unchecking Time synchronization option in Integration Services under VM settings?
batistuta09's user avatar
  • 9,096
4 votes
Accepted

AWS EC2 with huge clock drift at boot

There is a decent chance the answer is nowhere or nowhere it can reach. You should look at the Amazon Time Sync Service. This seems to be the recommended method now, because NTP also requires making ...
B. Miller's user avatar
  • 707
3 votes
Accepted

Ntpd on local network - Preventing clock drift causing high offsets

After trying a few different options on ntpd still having a too big delay, I switched to chrony. My NTP server remained unchanged. Using chrony gave me a latency of <1ms all the time. I increased ...
Daniel R.'s user avatar
  • 211
3 votes

Completely disable Date and Time sync in a Hyper-V VM

Hyper-V guests always synchronize time with the host on BIOS level during boot. Try to specify the time zone properly, otherwise you can manage time in Active Directory. You can check the following ...
Stuka's user avatar
  • 5,715
3 votes

hwclock: Cannot access the Hardware Clock via any known method

For me, the fix was just to type "sudo" before the command, as the "can't access" actually means it doesn't have perms to access /dev/rtcX. Running it with sudo fixed it by giving ...
Red050911's user avatar
2 votes
Accepted

NTP synchronized clock alongside the system clock

It seems to me that you are asking how to have Linux have a split-brain clock: one that never step-changes but can be wrong, for the kernel, and one that is right but may step-change, for everything ...
MadHatter's user avatar
  • 80.5k
2 votes
Accepted

How to have WSL think it is in the past?

Because WSL is not a virtual machine, it's always going to be tied to your underlying system time. If modifying your system time on demand is too cumbersome, you only have two options as far as I can ...
Ryan Bolger's user avatar
  • 16.8k
2 votes

Time on Windows servers out and won't stay corrected

The PDCe in the domain should be synced to a reliable external time source. All other domain clients should be synced to the domain hierarchy. https://docs.microsoft.com/en-us/windows-server/...
joeqwerty's user avatar
  • 111k
2 votes
Accepted

How to Set Up Time Synchronization with NTP on Ubuntu 20.04.1 LTS

Your timedatectl doesn't state systemd-timesyncd.service active: yes but NTP service: active which suggest you are using NTP, instead. With Ubuntu 20.04 LTS you could be running Chrony. Try e.g. ...
Esa Jokinen's user avatar
  • 49.7k
2 votes

No info found about `ethtool -T` output?

-T --show-time-stamping Show the device's time stamping capabilities and associated PTP hardware clock. https://linux.die.net/man/8/ethtool PTP stands for Precision Time Protocol that allows sub-...
Zac67's user avatar
  • 11.5k
2 votes
Accepted

No info found about `ethtool -T` output?

This is normally output via running ethtool -T <ifname> and indicates the index of the PTP clock. If there are multiple hardware clocks in the system you will see increasing values for this. For ...
bunnywarren's user avatar
1 vote

No info found about `ethtool -T` output?

PTP - Precision Time Protocol is a protocol used to synchronise clocks throughout a computer network. On a local area network, it achieves clock accuracy in the sub-microsecond range, making it ...
HBruijn's user avatar
  • 80.2k
1 vote
Accepted

How can I verify if time is set correctly on server in my bash script?

You can use command in Linux: date +%s and in Windows (PowerShell) Get-Date -UFormat %s to get epoch time. Those numbers can be easy compared. P.S. For Windows you may need to strip the number to ...
Romeo Ninov's user avatar
  • 5,922
1 vote

How can the local time clock of a server become the NTP time source in a network?

Clocks in general purpose computers are garbage, relative to the accuracy expected in modern devices. Not precisely calibrated, and a server's thermal changes can cause the drift to vary. So it needs ...
John Mahowald's user avatar
1 vote

How "real" is the POSIX clock in a virtual machine?

POSIX (and Linux in general) never really has guaranteed timers in the sense if you put something to sleep you can expect it to wake up at an exactly certain time. You can only ever guarantee that the ...
Matthew Ife's user avatar
  • 23.6k
1 vote

Is there a way to keep server times in sync to the millisecond, globally?

When you're down to the millisecond range, you can't do it with things like NTP. That is generally only accurate in the tens of milliseconds-range over the internet. You probably have to go with ...
vidarlo's user avatar
  • 9,092
1 vote
Accepted

Problems with chronyd Centos 7 all updates applied

I have ensured that ntp is functioning on ESX, it apears it was not configured correctly so I assume that when chronyd went offline it grabbed the time from ESX which was wrong. Yes, you need to ...
John Mahowald's user avatar
1 vote

Compute Engine VM clock runs fast and gains 15 seconds per hour (or about 1 second per each 4 minutes)

Upgrade? First - you notice that 5 minutes off cause problems. Any admin will tell you that this is because Kerberos hates ticket time offsets more than that on windows ;) Your main problem is ...
TomTom's user avatar
  • 51.9k
1 vote

Completely disable Date and Time sync in a Hyper-V VM

In addition to the answer that suggests to stop "Windows Time" and "Hyper-V Time Synchronization Service", I found that you not only need to stop it, but to deactivate the "Windows time" service. If ...
Fabian Marcus Viol's user avatar
1 vote

Completely disable Date and Time sync in a Hyper-V VM

For anyone still looking for this answer, there are 2 services in the VM that need to be stopped - "Windows Time" and "Hyper-V Time Synchronization Service". When I stop (and disable) both of these ...
MDK's user avatar
  • 11
1 vote

FreeBSD: how to syncronize the system clock with the hardware clock in bash?

See answer 1 (below?) for general advice. In order to make sure that ntpd will set the clock it should be run with the -g switch. Or if you do it by hand "ntpd -g -n". The last switch is to make sure ...
Tarjei Jensen's user avatar
1 vote

FreeBSD: how to syncronize the system clock with the hardware clock in bash?

Check sysctl machdep.disable_rtc_set. It should be 0, and hardware clock is set automatically every time settimeofday() is called. Then, if the ntpd is running, you don't have to set hardware clock ...
Esa Jokinen's user avatar
  • 49.7k
1 vote

NTP service stopped in centos7.1 linux machine

Speculative answer: on-board clock might drift if power is cut. Maybe on-board battery is nearly dead. If machine is powered down for a while and power is cut off then the time set upon reboot might ...
gaoithe's user avatar
  • 193
1 vote

Synchronize clock with NTP while online, and with RTC while offline?

Set it up to use the pseudo-clock "local clock". Add this to ntp.conf server 127.127.1.1 iburst fudge 127.127.1.1 stratum 8 server 127.127.1.1 is the pseudo-clock aka the local RTC. iburst ...
cde's user avatar
  • 161

Only top scored, non community-wiki answers of a minimum length are eligible