Overview of additional packages: AdditionalPackages
NTP daemon
Maintain your clock in sync with the world and serve it to other clients.
Features
The WL-500g's firmware includes a copy of ntpclient. It is used to set the system time at boot. It also seems to be run every once in a while by the watchdog. But you can also have it running in the background, constantly tracking your upstream server.
The ntpclient however, is not an NTP server. If you want an NTP server, you have two options:
ntpd or openntpd.
openntpd has the following caracteristics:
- Small (52KB which easily fits in flashfs).
- Can sync up with several NTP servers, for better reliability.
- But it currently tracks time fairly poorly (0.2s of offset are common and clients have trouble staying in sync with it).
ntpd has the following caracteristic:
- Full featured: dynamic configuration with ntpdc and more.
- NTP broadcasting.
- Query with ntpq.
- Fancy algorithms to (hopefully) get the best time tracking possible.
- Large (280KB which does not fit in flashfs).
Download
Pre-compiled packages can be downloaded here:
http://www.iro.umontreal.ca/~monnier/wl500g
Source
The source code can be downloaded here:
http://www.openntpd.org/ and
http:/.www.ntp.org/.
Compiling
Both packages required some fiddling to get them to compile.
The openntpd binary has additional experimental personal changes.
Installation
Note: This installation guide assumes Flashfs-boot method for storing user configuration. Anyone using the BootCmds should migrate. More info is available here: FlashfsBoot.
Place the binary in /usr/local/sbin and run it from /usr/local/init/post-boot. The openntpd config file should go to /usr/local/etc/ntpd.conf whereas the ntpd config file needs to be put in /etc/ntp.conf.
Note that both daemons assume that the clock is almost correct at startup, so you still need to let the startup scripts run ntpclient to set the initial time.
Note: The flashfs partition for storing the user configuration is only 64Kb in size. You must be sure not to store more into the flashfs then this amount, so only ntpd can be stored in flash. Openntpd needs to be stored on an external USB device. Check the FlashfsBoot page for more info.
Related Links
Elsewhere:
- (description) (url)
Known problems
- My WL-500g is badly drifting, so both daemons spend a fair bit of time at startup trying to figure out the drift. The ntpd daemon can save the result in a file (the driftfile) so it settles more quickly next time around. By placing this driftfile in /usr/local/etc/ntp.drift you can save it in flashfs and get better time quality right when you boot.
- openntpd still needs work to get it to track time better.
