fgci-org / fgci-ansible

:microscope: Collection of the Finnish Grid and Cloud Infrastructure Ansible playbooks
MIT License
54 stars 18 forks source link

Update example for nhc_check of chronyd #186

Open martbhell opened 7 years ago

martbhell commented 7 years ago

https://github.com/CSC-IT-Center-for-Science/fgci-ansible/commit/54377214f1cced65ac071f654c1c864cb09da1f9#commitcomment-20759236

martbhell commented 7 years ago

From Ivan:

What differs are "System time" and "RMS offset", they should be
something like 0.000xxxx and if any larger, then there is a problem.

[root@opt51 ~]# chronyc tracking
Reference ID    : 10.10.254.19 (admin2.int.triton.aalto.fi)
Stratum         : 4
Ref time (UTC)  : Wed Feb  8 11:36:58 2017
System time     : 16042.547851562 seconds fast of NTP time
Last offset     : +0.000022398 seconds
RMS offset      : 4569.594238281 seconds
Frequency       : 14.935 ppm slow
Residual freq   : +0.109 ppm
Skew            : 0.550 ppm
Root delay      : 0.001550 seconds
Root dispersion : 0.019479 seconds
Update interval : 70.5 seconds
Leap status     : Normal
martbhell commented 7 years ago

From the nhc mailing list:

* || check_cmd_output -t 2 -m '!/: [0-9]{3,}\.[0-9]+ seconds [a-z]+ of NTP time/' chronyc tracking

This command seems to work on my test system - it doesn't drain the node if time is in sync. Have asked reporter via other channels if the check above drains a node where the clock is off.