AEOS NTP Process Manual
AEOS NTP Process Manual
Version 4 23-08-2018
Installation and Configuration | AEOS NTP process EN
Contents
1. WHAT IS NTP? 4
5. TROUBLESHOOTING 8
5.1 NORMAL SITUATION: NTP IS SYNCHRONISED / SYNCHRONISING 8
5.2 PROBLEM: NTP DOES NOT SYNCHRONISE 8
5.3 PROBLEM: STRANGE BEHAVIOUR WHEN THE SERVER CLOCK IS MANUALLY CHANGED 10
5.4 HELPFUL COMMANDS ON AN XSCALE AEPU. 11
5.5 KNOWN PROBLEMS WHEN THE AEOS APPLICATION SERVER IS A WINDOWS SERVER 12
5.6 WHICH NTP SERVICE SHOULD WE USE? 14
5.7 STILL HAVING PROBLEMS 14
5.8 CHECK ROOT DISPERSION 15
5.9 IF THE ROOT SERVER IS WINDOWS TIME SERVICE 15
5.10 EXAMPLE 15
5.11 NTP AND VMWARE 16
5.12 CONCLUSIONS 16
5.13 FURTHER RESOURCES 17
1. What is NTP?
NTP (Network Time Protocol) is used to synchronise your system's time with an online server. This
is a very useful application, and should be installed on every network machine.
NTP can also be used to serve time for a network. For example a LAN consisting of Windows and
Linux machines can all synchronise to a single NTP server, saving bandwidth. For AEOS this
process is used to synchronise the AEPU time with the AEOS application server time.
Initially, the polling time of the client is 16 s, and as the time has become accurate, the polling
interval is gradually decreased to 1024 s. This already shows that NTP will not react instantly to
time changes caused by e.g. the user on the server (change the clock). The NTP daemon on the
AEpu is started with the g flag to allow for time jumps to be synchronised in steps.
NTP daemon
AEOS server
NTP daemon
NetworkTimeProtocol
service NTP daemon
ntptrace determines where a given Network Time Protocol (NTP) server gets its time from, and
follows the chain of NTP servers back to their master time source.
If given no arguments, it starts with localhost. On each line, the fields are (left to right):
• the host name (aepu999)
• the host stratum (stratum 14)
• the time offset between that host and the local host (as measured by ntptrace; this is
why it is not always zero for "localhost") (offset 0.005996)
• and the host synchronization distance (synch distance 0.02357)
The host stratum is a value which indicates the accuracy of the system. A client NTP process can
only synchronise to a server which has a next lower stratum. When the NTP daemon on the AEpu is
started, it has a stratum of 14 and it is specified that it can only synchronise with a server which
has a lower stratum then 13.
Explanation of the Stratum value:
0 : unspecified or unavailable
1 : primary reference (e.g., radio clock)
2-15 : secondary reference (via NTP or SNTP)
16-255 : reserved
5. Troubleshooting
5.1 Normal situation: NTP is synchronised / synchronising
During normal operating the NTP process is synchronised, ntpstat (on the AEpu) gives following
response:
• 586 AEpu
# ntpstat
synchronised to NTP server (10.1.16.221) at stratum 14
time correct to within 129 ms
polling server every 128 s
• XScale AEpu
# ntpq –p
remote refid st t when poll reach delay offset jitter
=========================================================================
*aeosserver 10.1.8.10 3 u 40 128 175 1.053 129.61 152.853s
Here you can see that the time difference between AEpu and NTP server is 129ms, and is still
synchronising (polling time is 128 sec, should go to 1024 sec).
Because there’s no * before aeosserver, it’s connected to the NTP server but not (yet)
synchronised.
On the server side, ntptrace will show:
C:\AEOS\utils>ntptrace aepu999
aepu999: stratum 16, offset 0.007972, synch distance 0.00356
73.78.73.84: *Timeout*
Also on the AEpu you can check if the NTP process can find the server specified:
• 586 AEpu
# /etc/init.d/timeconfig restart
tick = 10035
Looking for host aeosserver and service ntp
host found : aeosserver.nedap.local
14 Jun 11:31:01 ntpdate[8727]: no server suitable for synchronisation found
• XScale AEpu
Looking for host aeosserver and service ntp
host found : aeosserver.nedap.local
15 Feb 14:08:57 ntpdate[22529]: no server suitable for synchronisation found
Above two examples the host can be found, but no NTP process can be found there.
• 586 AEpu and XScale AEpu
# /etc/init.d/timeconfig restart
tick = 10035
Looking for host aeosserver and service ntp
host found : aeosserver.nedap.local
14 Jun 11:34:12 ntpdate[8767]: step time server 10.4.16.51 offset -12.614744 sec
Now above the NTP process can be found on the specified server.
Possible causes
• NTP process is not running on the server.
• NTP process is starting and the stratum (level of accuracy) is higher than that of the AEpu
(normally this is the case when the windows clock has been changed manually).
• There is no network connection between AEpu and server.
• There is a name resolving problem (AEpu and server have different names on different
platforms).
Solution
• start the NTP process.
• ping from both sides using IP address and hostname.
• wait, if the processes are running, it may take a long time before the time server has reached a
stratum 13 level.
• if the NTP time server is operating properly and the time process on an AEpu is restarted it
usually takes about 5 minutes before the synchronisation is effectuated (but it can also take a
lot longer to reach the correct time, depending on how the NTP processes synchronise).
• Sometimes the server has no correct behaviour if beside the NTP process also the Windows
Time process is active. Go to the Services of Windows at Stop the Windows Time process. (Set
also this service to Manual to prevent that after a reboot of the server this service is running
again.)
• For getting more information you can let the NTP process create a logfile by make a change at
the registry of the server and restart the NTP process. Go to
\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\NetworkTimeProtocol and add to
the entry C:\WINDOWS\System32\ntpd.exe following string: –L C:\ntp.log . This will now
generate a logfile with information about the NTP process ( in this example at C:\).
• XScale AEpu
• ntpq -p will show an offset between the local host and the aepu
• the polling interval of ntpd on the AEpu will decrease to 16 seconds
• after several minutes, the ntpq -p will show:
# ntpq –p
remote refid st t when poll reach delay offset jitter
========================================================================
*aepsserver 10.1.8.10 3 u 811 16 377 1.087 53.623 98.750
Solution
• restart and initialise the AEpu time ( using setdatetime.bat or /etc/init.d/timeconfig restart)
• and wait for everything to synchronise.
5.10 Example
When the domain controller is also the NTP-server (with Windows Time) without external clock
and AEOS is installed on another W2k3 sp1 as domain member which synchronises the time
(Windows Time) with the domain controller automatically (NT5DS).
1. On the Domain Controller the Windows Time service must be configured as:
HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config
LocalClockDispersion = 0
AnnounceFlags = 5
Don't forget to restart the time service.
2. On the AEOS server:
Stop and disable the AEOS NTP.
HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer
Enabled = 1
3. Don't forget to restart the time service.
5.12 Conclusions
Never ever run two NTP services together and if the root NTP server is a W2k3 Windows Time
service external or internal always check the root dispersion on the AEpu. If the root dispersion is
much to high (always wait at least 15 min.) check how the Windows Time is configured and adjust
the parameters if necessary. Even if the Windows Time service is not the root service, be aware it
is possible that it can become the root service when the original root server fails.
Setup Windows Time on a Windows 2003 server to connect to an external NTP server
http://support.microsoft.com/kb/816042
Disclaimer
Nedap has made every effort to ensure the accuracy of the
information contained in this document. However, Nedap makes
no representations or warranties whatsoever whether express or
implied as to the accuracy, correctness, currency, completeness
or fitness or suitability for any purpose of such information and
therefore disclaims to the maximum extent permitted by
applicable law any and all liability for any error, damage, loss,
injury or other consequence which may arise from use in any
manner of any information contained in this document. Nedap
makes no commitment to update or keep current the information
in this document and reserves the right to make improvements to
this document and/or the products described therein at any time
without notice.