Introduction
Synchronization of server time is relevant for operation of JS7 products. If server clocks are not synchronized then
- jobs executed with different Agents will not display accurate start times and end times in the JS7 - History and in log files.
- the JS7 - Controller Cluster and JS7 - Agent Cluster will be affected and might not work.
Find a more detailed explanation about the relevance of time synchronization from the JS7 - FAQ - Why is Synchronization of Server Clocks relevant article.
Check Server Time
Servers typically are equiped with a Time Service that connects to well-known Time Servers to synchronize the server's clock.
For Unix, frequently used Time Services include NTP and Chrony:
ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== -ntp1.as213151.n 131.188.3.222 2 u 755 1024 177 20.908 9.928 21.346 +y.ns.gin.ntt.ne 129.250.35.222 2 u 791 1024 37 20.177 1.818 1.756 +de-fra2-ntp1.le 193.79.237.14 2 u 996 1024 3 21.099 2.303 1.113 *mail.gunnarhofm 192.53.103.103 2 u 664 1024 177 25.114 3.153 1.374
chronyc tracking
The output of both commands will give you the "offset" column that indicates the difference in milliseconds between your server's clock and the Time Server's clock.
The "st(ratum)" column tells you the distance in hierarchy for a given Time Server from an authoritative Time Source. Stratum 0 indicates direct access which is not available from networks. Stratum 1 indicates a Time Server with direct access to an authoritative Time Source. Stratum 2 indicates a Time Server with access to a Time Server using stratum 1 etc. The difference in stratum typically results in one digit in milliseconds. The relevance for JS7 products is more in the range of 1-3 seconds.
When comparing server times, in a first step run one of the above commands on both servers and compare "offset" values.
- If offsets are similar and indicate two digit values in milliseconds at maximum, then there is no concern.
- If offsets exceed 1000ms, then time synchronization should be verified for the given server.
Compare Server Time between Hosts
User's who want to directly compare two server's time can apply the following approach:
# modify the NTP configuration sudo vi /etc/ntp.conf # to the list of servers add the one you want to compare server 0.centos.pool.ntp.org iburst server 1.centos.pool.ntp.org iburst ... server <your-server> # run the command to compare server times ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== *where-you.at 131.188.3.220 2 u 5 64 1 24.874 0.248 0.106 gate02.masgalor 129.69.253.1 2 u 4 64 1 25.400 0.378 0.157 netcup01.therav 131.188.3.222 2 u 3 64 1 23.350 0.120 0.146 ntp01.ipfire.or 194.58.204.196 2 u 2 64 1 21.999 -0.067 0.154 <your-server> .INIT. 16 u - 64 0 0.000 0.000 0.000
Explanations:
- Specify the hostname or IP address of the server for the
<your-server>
placeholder. - When running the
ntpq -p
command, then<your-server>
should be displayed from the list of Time Servers.- An offset 0 indicates zero difference in time between both servers.
- How comes? In the above example both servers are VMs running on the same hardware host from which they receive clock ticks. Ideally the time offset between VMs should be zero. When higher values are indicated then this means that different hardware hosts are used or that server load delays acceptance of hardware clock ticks by the emulated software clocks of related VMs.