Score:1

ntpdate -t does not timeout with the timeout value

fi flag

I am using ntpdate to update the time. If there is no internet connection or the NTP server is down, ntpdate fails, but ntpdate takes a long time to exit (approximately 20 to 23 seconds). I read the manual of ntpdate and I see -t timeout option.

-t timeout Specify the maximum time waiting for a server response as the value timeout, in seconds and fraction. The value is rounded to a multiple of 0.2 seconds. The default is 1 second, a value suitable for polling across a LAN.

I thought to try this option but it is taking the same amount of time to exit. I thought if we specify timeout then ntpdate will exit within specified seconds. I used the command like this

ntpdate -u -t 10 <ip>

Did anyone try the timeout option in ntpdate?

Michael Hampton avatar
cz flag
If your Internet connection is intermittent or unreliable, consider using an NTP client/server designed for this scenario such as chrony.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.