Ntpdate not updating

09-Jun-2020 06:51

######################################################################### ## Monit control file ############################################################################### set daemon 60 # check services at 2-minute intervals set logfile /var/log/# set pidfile /var/run/set idfile /var/lib/monit/id set statefile /var/lib/monit/state set eventqueue basedir /var/lib/monit/events # set the base directory where events will be stored slots 100 # optionally limit the queue size set alert [email protected]# receive all alerts set mailserver localhost # include /etc/monit/conf.d/* include /etc/monit/conf-enabled/* STEP 17: That’s it, you now have NTP correctly configured on Ubuntu 16.04.But if you are a little paranoid like I am I have written a little shell script running with CRON below which, for now, emails me every 6 hours to confirm everything is 100% in tune and synced correctly.It’s just my little extra step of caution over the next few weeks and once I am happy I will disable this cronjob and just leave Monit to take over.One you are happy after a few days or weeks, you can simply remove the cronjob or disable it with a # at the beginning If you want to keep running it forever but only have one alert per day, let’s say in the morning only, then your cron could be setup like this Then this will only do the timecheck every morning at am. As for the bug, the Ubuntu people really need to sort this out and Fix NTP on Ubuntu as it involves the deprecated ntpdate package which should actually be removed altogether and this is causing a lot of problems for people, most who seem totally unaware of this issue.I won’t go into any length or detail of the bug but you can read about it here if you like.I will simply just provide you with the correct fix and it will take you all of a minute or two to fix.Local time: Tue 2017-04-11 SAST Universal time: Tue 2017-04-11 UTC RTC time: Tue 2017-04-11 Time zone: Africa/Johannesburg (SAST, 0200) Network time on: yes NTP synchronized: yes RTC in local TZ: noremote refid st t when poll reach delay offset jitter ============================================================================== *nist1-lnk.binar . 1 u 872 1024 377 32.028 4.001 0.026 2.70 142.3.100.2 2 u 481 1024 377 23.152 -11.972 0.237 -ntp1.192.168.100.252 2 u 1026 1024 377 26.160 -7.960 0.032 ntp2.192.168.100.251 3 u 798 1024 377 19.403 -0.363 0.029 -ntp3.192.168.100.251 3 u 316 1024 377 14.377 9.362 4.976Local time: Tue 2017-04-11 SAST Universal time: Tue 2017-04-11 UTC RTC time: Tue 2017-04-11 Time zone: Africa/Johannesburg (SAST, 0200) Network time on: yes NTP synchronized: yes RTC in local TZ: no STEP 14: If everything checks out we want one final step now to make sure NTP is monitored and if it ever happens to fail for some reason it will get restarted and you will get notified by email about it.For this we are going to use monit to monitor our NTP service.

Then it dawned upon me to check NTP as I have been experiencing problems with NTP crashing on both upgrades from Ubuntu 14.0 16.04 and even on fresh 16.04 installs.

This is the ntp server that shows up in the Date/Time system pref pane GUI.

This command doesn't force the Mac to sync with the ntp server at all - it just tell Mac OS X *which ntp server* to use."systemsetup -setusingnetworktime" = Simply *enables* or *disables* the ntp client in favor of a stand-alone manual time configuration.

So here’s how to get NTP correctly setup on Ubuntu 16.04 once and for all.

STEP 1: I am assuming you already have ntp and ntpdate installed.

Then it dawned upon me to check NTP as I have been experiencing problems with NTP crashing on both upgrades from Ubuntu 14.0 16.04 and even on fresh 16.04 installs.

This is the ntp server that shows up in the Date/Time system pref pane GUI.

This command doesn't force the Mac to sync with the ntp server at all - it just tell Mac OS X *which ntp server* to use."systemsetup -setusingnetworktime" = Simply *enables* or *disables* the ntp client in favor of a stand-alone manual time configuration.

So here’s how to get NTP correctly setup on Ubuntu 16.04 once and for all.

STEP 1: I am assuming you already have ntp and ntpdate installed.

I thought that one of the Apple "systemsetup" commands would poll a ntp server and sync accordingly, but I cant find the proper option. Usage: systemsetup -setusingnetworktime Thanks ehemmete. I looked at all of Apple's options, but they don't actually SYNC the time like the traditional UNIX commands do.