| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
| doc:uci:ntpclient [2011/09/18 21:15] – written_direcon | docs:guide-user:services:ntp:client [2019/08/26 11:23] – tag optimization vgaetera |
|---|
| ====== Ntpclient Configuration ====== | ====== Ntpclient Configuration ====== |
| |
| The ''ntpclient'' configuration file defines parameters for the [[http://doolittle.icarus.com/ntpclient/|ntpclient]] program, a small daemon that will keep the local clock in sync with time servers on the internet. | The ''ntpclient'' configuration file defines parameters for the [[http://doolittle.icarus.com/ntpclient/|ntpclient]] program, a small daemon that will keep the local clock in sync with time servers on the internet. |
| |
| ===== Sections ===== | ===== Sections ===== |
| |
| The configuration file consists of a section defining general daemon options, a section defining clock drift information, and one or more sections defining time server hosts to use. | The configuration file consists of a section defining general daemon options, a section defining clock drift information, and one or more sections defining time server hosts to use. |
| |
| ==== Ntpclient ==== | ==== Ntpclient ==== |
| |
| The ''ntpclient'' section defines general daemon options. This is the default configuration for this section: | The ''ntpclient'' section defines general daemon options. This is the default configuration for this section: |
| | ''config 'ntpclient' | | ''config 'ntpclient' |
| |
| ==== Drift ==== | ==== Drift ==== |
| |
| The ''ntpdrift'' section defines parameters to adjust the drift of the local clock so that it can run more accurately. Please see the [[http://doolittle.icarus.com/ntpclient/HOWTO|ntpclient HOWTO]] on how to compute these parameters. | The ''ntpdrift'' section defines parameters to adjust the drift of the local clock so that it can run more accurately. Please see the [[http://doolittle.icarus.com/ntpclient/HOWTO|ntpclient HOWTO]] on how to compute these parameters. |
| |
| |
| ===== Hosts ===== | ===== Hosts ===== |
| |
| To receive time, at least one host must be configured through a ''host'' section. OpenWrt will try the specified hosts in order, and use the first one that is responding to time requests. OpenWrt uses the [[http://www.pool.ntp.org/|NTP Pool]] to locate a close-by time server. | To receive time, at least one host must be configured through a ''host'' section. OpenWrt will try the specified hosts in order, and use the first one that is responding to time requests. OpenWrt uses the [[http://www.pool.ntp.org/|NTP Pool]] to locate a close-by time server. |
| |
| |
| ===== Ntpclient Startup Details ===== | ===== Ntpclient Startup Details ===== |
| |
| The ntpclient is started via the ''hotplug.d'' subsystem upon any network interface startup (for the curious, see ''/etc/hotplug.d/iface/20-ntpclient''). The script starts the daemon in 4 phases: | The ntpclient is started via the ''hotplug.d'' subsystem upon any network interface startup (for the curious, see ''/etc/hotplug.d/iface/20-ntpclient''). The script starts the daemon in 4 phases: |
| - **preliminary test** - the script checks if the ntpclient is already running. | - **preliminary test** - the script checks if the ntpclient is already running. |
| |
| ===== Ntpclient Shutdown Details ===== | ===== Ntpclient Shutdown Details ===== |
| |
| All instances of the ntpclient are killed via the hotplug.d subsystem upon any network interface shutdown(!) (for the curious, see /etc/hotplug.d/iface/20-ntpclient). | All instances of the ntpclient are killed via the hotplug.d subsystem upon any network interface shutdown(!) (for the curious, see /etc/hotplug.d/iface/20-ntpclient). |
| | |