Tag Archives: ntpd

NTP – ntpdate works but does not update system time

Today I got a wired issue on AWS RHEL servers, ntpdate can’t update the time on it.

ntpdate can find out the time difference, but do not update system time.

And I did some research and found out this issue was caused by Wallclock Setting.

Below are the solutions for this issue:

0 means that the virtual machine is getting time from the host and not using independent wallclock.
1 means that the virtual machine is using independent wallclock and managing its time independent from the host.

Permanently Changing the Independent Wallclock Setting

Log in to the virtual machine environment as root.

Edit the virtual machine’s /etc/sysctl.conf file.
Add or change the following entry:

Enter 1 to enable or 0 to disable the wall clock settting.
Save the file and reboot the virtual machine operating system.

When it boots, a virtual machine gets its initial clock time from the host. Then, if the wallclock setting is set to 1 in the sysctl.conf file, it manages its clock time independently and does not synchronize with the host clock time.

Temporarily Changing the Independent Wallclock Setting

Log in to the virtual machine environment as root.
Enter the following command:

Enter 1 to enable or 0 to disable the wall clock settting.

Add or change the following entry:

Enter 1 to enable or 0 to disable the wall clock settting.