Use ‘ntpdate’ to force update while NTPD running

30Oct10

I know that in Windows there is W32Time that can help synchronizing time with external servers, however, on my netbook with a few OS installed, when switch from another OS to Wiindows, time seems to be messed up. I also know that we can set it to run more frequently than the default. Yet I need more control, so I decided to use NTPD on Windows from http://www.meinberg.de/english/sw/ntp.htm#ntp_nt_stable but the problem is still there, when switching back from another OS, my clock is not current (it is about 7 hours different which means the other OS set my clock to UTC and I am living in +0700 UTC). I tried ‘ntpdate’ but still did not work with error message ‘socket in use’. So after searching a while, it ended up that I need ‘-u’ option, so

ntpdate -ub my_ntp_server

is required to set time while NTPD is running (-b required for Windows – if the software already knows it is running on Windows, why not enables it by default???).

The -u option is described below

 -u      Direct ntpdate to use an unprivileged port for outgoing packets.
             This is most useful when behind a firewall that blocks incoming
             traffic to privileged ports, and you want to synchronise with
             hosts beyond the firewall.  Note that the -d option always uses
             unprivileged ports.

 

Advertisements


No Responses Yet to “Use ‘ntpdate’ to force update while NTPD running”

  1. Leave a Comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: