Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Network time synchronization software, NTPD replacement.

NotificationsYou must be signed in to change notification settings

bsdphk/Ntimed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this ?

This is a preview/early-acces/alpha/buzzword-of-the-times releaseof a new FOSS project written to gradually take over the world ofnetworked timekeeping.

The first step is a NTP protocol client daemon, 'Ntimed-client',which will synchronize a systems clock to some set of NTP servers

If this catches on, support for slave servers, refclocks and otherprotocols, such as PTP, can be added, subject to interest, skill,time and money.

The overall architectural goals are the same as every other FOSSproject claims to follow: Simplicity, Quality, Security etc. etc.but I tend to think that we stick a little bit more closely to them.

This work is sponsored by Linux Foundation, partly in response tothe HeartBleed fiasco, and after studying the 300,000+ lines ofsource-code in NTPD. I concluded that while itcould be salvaged,it would be more economical, much faster and far more efficient tostart from scratch.

Ntimed is the result.

What should you do with this

You can take this code, compile it, run it, and it will steer yourcomputer's clock, but I am not going to encourage you to do that inproduction yet -- unless you know what you are doing and why youare doing it: This is only a preview release.

Soon-ish, there will be full production-ready releases andpackages for your favourite operating system, but we are notthere yet.

But if you are willing to read C-source code to figure out what theprintouts mean or if you care about quality time-keeping or qualityprogramming, I would love to hear your feedback, reviews, and ideas.

Where can I read more ?

I maintain a blog-of-sorts about this project here:

http://phk.freebsd.dk/time

There you will find information about theory, practice,and the thinking that tries to bridge the gap between them.

Updates typically happen during weekends -- that is when I work onNtimed.

Who do I yell at and how ?

Me, Poul-Henning Kamp. Please send email tophk@Ntimed.org.

What happens next ?

The plan is to have the first production-ready release in Q1/2015.

Hopefully OS releases will then adopt Ntimed - first as an alternativeto, and later as replacement for NTPD in client applications.

It is not my intent to start and manage an entirely new FOSS projectaround Ntimed. Harlan from The Network Time Foundation has agreedto adopt Ntimed and it will run in/with/parallel to the NTPD project.Or something. We still need to flesh out all those details.

How to compile

Pull the source code over to the machine you want to play on, and:

sh configuremake

(That was fast, wasn't it ? -- Amazing how slow things aren'twhen you don't go hunting for 27 different FORTRAN compilers foryour C code.)

How to test

Stop ntpd if it is running, and then:

./ntimed-client -t /tmp/somefile some_ntp_server some_other_ntp_server

That should synchronize your clock to those servers.

Because this is a preview release, the process will not "daemonize"into the background.

The '-t /tmp/somefile' arguments tells it to write a full blow-by-blowtracefile, for analysis and debugging.

If something goes wrong, I'm going to ask you for a copy the tracefile.

What happens when you run it ?

After a few seconds, your clock will be stepped if necessary.(In the final version, this is where the process daemonizes into thebackground -- from which point you can trust your clock to be good.)

In the next 30-60 seconds, the PLL will eliminate any residual phaseerror and from this point in time, your computer's clock should begood to a few milliseconds - depending on the quality of the servers.

After about 5-10 minutes, the PLL will have integrated thefrequency error of your computer's crystal, and the PLL willstart to "stiffen" to minimize the amount of steering necessaryto keep the clock aligned to the servers.

If you are using distant or very distant servers, it will take longertime before the PLL stiffens.

Packet traces and simulations

You can also run the program two other ways:

./ntimed-client --poll-server some_ntp_server some_other_ntp_server

This willnot steer your clock, but it will query the servers asif it should have steered your clock. (Ntpd shouldnot be runningat the same time.) By default it terminates after 1800 seconds,but you can control that with "-d 3600" for one hour etc.

If you save the output into a file (redirect stdout or use '-t filename'),you can use it as input for a simulation run:

./ntimed-client --sim-client -s filename -t /tmp/_

And then run:

python plotgen.py

Then you can finally get some nice pictures to look at by:

gnuplotload '/tmp/_g'

Tweaking parameters

Parameters can be examined and tweaked with '-p' arguments:

-p '?'

Gives a list of available parameters, and you can get information abouteach parameter:

-p parameter_name

To set the parameter to a non-default value:

-p parameter_name=new_value

Not everything which should be a parameter is yet, and there aresome unused dummy parameters there, just to make sure the macro-magicworks.

Thanks and acknowledegments

First and foremost a big thanks to Professor Dave L. Mills.

Thanks for being the first time-nut on the InterNETs, as we calledthem back then.

Thanks for being an all-round pleasant fellow to work with.

Thanks for adopting my 'nanokernel' and 'refclock_oncore'.

But in particular thanks for lending me the most cantankerous LORAN-Creceiver the world have ever seen, at a time in my life where Ibadly needed that a distraction to keep me sane.

A big thanks to the Linux Foundation for realizing that NTPD wasin dire straits after Dave Mills retired.

Thanks for giving me money and free hands to do what I thought wasbest -- even though I am a "BSD-guy".

Thanks to Harlan Stenn for keeping the NTPD flame burning, howeverstormy the last decade has been.

I trust The Network Time Foundation will take as good care of Ntimedin the future, as it has taken care of NTPD in the past.

A special wave of the hat to John R. Vig for his famous QuartzCrystal Tutorial.

And finally, a shout-out and thanks to time-nuts@ in general andTom Van Baak in particular, for being jolly and interesting companyfor people who happen to care about nanoseconds, leap seconds,choke-ring antennas and the finer points of SC- vs. AT-cut quartzcrystals.

phk

About

Network time synchronization software, NTPD replacement.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors6


[8]ページ先頭

©2009-2025 Movatter.jp