You've been in open source too long. Catch up. LOL
ntp is NOT used in that fashion any more. It is now a service. Each time you "set" the time, you break that services ability to "sync".
ntp.conf is designed to allow configuration of the ntp daemon which syncs on a continuing basis and keeps track of "how far off" in data files and eventually adjusts itself to maintain proper time precisely (even under heavy load).
since hwclock is only used to set the time during startup, and is usually set to the current time at reboot, it's not used during the day by any process directly (except the ntp daemon, which sets the system time and uses its internal offsets to make that perfect). But if you "reset" time every 5 minutes, this process will never actually happen and your system will never sync.
in opensuse, you can also use "yast" to set the servers to which time will sync.
in a cluster you would have only one server (usually the db, but any server will do) check externally and all the other servers will sync to that one. thus all servers in the cluster will have one time. we also use iburst in this situation to speed the sync process.
in short: hwclock is not meant to have the perfect time. it's job is to go at the same speed all day. ntp uses that constant speed and external time servers with perfect time to Calculate perfect time and modify the server time accordingly. so don't mess with the ntp daemon's ability to complete this process
But how do you know if the ntp daemon is "synced"?
- Code: Select all
ntpq -p
If a server listed has a + or * in the left column, the server has synced with that external time service. If none have this symbol, it is attempting to sync but has not yet succeeded. This process normally takes more than 5 minutes. If you "reset" time every 5 minutes, it will never succeed. In fact, even if it does succeed all that data will be deleted when you "set" the time.