Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > NTP client

Reply
Thread Tools

NTP client

 
 
bob
Guest
Posts: n/a
 
      06-01-2012
Does anyone know of a really good implementation of an NTP client in Java?

Thanks.
 
Reply With Quote
 
 
 
 
Gunter Herrmann
Guest
Posts: n/a
 
      06-01-2012
Hi!

bob wrote:
> Does anyone know of a really good implementation of an NTP client in Java?


Why not run a client on the OS?
Works perfectly for me on Windows XP and Linux.

Gunter in Orlando, Fl.
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      06-01-2012
On Fri, 1 Jun 2012 06:50:07 -0700 (PDT), bob <(E-Mail Removed)>
wrote, quoted or indirectly quoted someone who said :

>Does anyone know of a really good implementation of an NTP client in Java?


If you want something simple, cannibalise the code inside SetClock. It
works at the UDP level. see
http://mindprod.com/products1.html#SETCLOCK.html

For background on NTP see http://mindprod.com/jgloss/ntp.html
including lists of servers.
--
Roedy Green Canadian Mind Products
http://mindprod.com
Controlling complexity is the essence of computer programming.
~ Brian W. Kernighan 1942-01-01
..
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      06-13-2012
On Fri, 01 Jun 2012 12:38:47 -0400, Gunter Herrmann
<(E-Mail Removed)> wrote, quoted or indirectly quoted
someone who said :

>Why not run a client on the OS?
>Works perfectly for me on Windows XP and Linux.


in windows you spawn
w32tm.exe /resync

to resync your clock. From there you can get time via java.

see http://mindprod.com/jgloss/timesources.html
for details.
--
Roedy Green Canadian Mind Products
http://mindprod.com
Controlling complexity is the essence of computer programming.
~ Brian W. Kernighan 1942-01-01
..
 
Reply With Quote
 
Gunter Herrmann
Guest
Posts: n/a
 
      06-14-2012
Hi!

Roedy Green wrote:
> in windows you spawn
> w32tm.exe /resync


In a corporate network you should have (at least) 2 servers that run
ntpd getting the time signals from multiple outside sources.
You should ask for permission to use these sources.
Then close the ntp port in the firewall for everyone except these
servers. All your other systems should get the time from your own
time servers.

On Unix/Linux boxes install ntpd and have it point to your
corporate time servers.

Sync your Windows domain controllers with your corporate ntp
servers, all computers in the domain will get their time from there.

Your windows systems that are not part of a domain should get their
time from your ntp servers.

To automate this I use a batch file to set/change the registry entries.

Here the content:

w32tm /register
w32tm /config /manualpeerlist:"Your corporate servers"
reg add HKLM\System\CurrentControlSet\Services\W32Time\Par ameters /v "Period" /t REG_DWORD /d 0 /f
reg add HKLM\System\CurrentControlSet\Services\W32Time\Con fig /v "MaxNegPhaseCorrection" /t REG_DWORD /d 4294967295 /f
reg add HKLM\System\CurrentControlSet\Services\W32Time\Con fig /v "MaxPosPhaseCorrection" /t REG_DWORD /d 4294967295 /f

Setting the maximum correction to infinity makes sure that a
system with a bad CMOS battery is still synced.

Regards

Gunter
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure an ntp client deanamallery@gmail.com Cisco 1 07-09-2012 03:38 PM
ntp multicast client? Joerg Dorchain Cisco 0 03-30-2005 07:03 AM
Convert to NTP Timestamp Manzoorul Hassan Perl 1 03-11-2005 05:37 PM
ntp from ntp.org Scott Crabb Cisco 5 08-06-2004 09:30 PM
2610 refusing NTP service Ross Vandegrift Cisco 0 07-16-2003 09:45 PM



Advertisments