[Linux][NTP] 時刻同期にChronyを使用してみた。

AIX、UNIX、Linux
chrony – Introduction
Page Not Found
Learn more about Fedora Linux, the Fedora Project & the Fedora Community.

Fedora 16から時刻同期についてはchronyがデフォルトで使用されているようなので、少し使用してみることにしました。下記にコマンドの実行結果について記載しますが、詳細についてはドキュメントを参照してください。

chronydがアクセスしている現在の時刻ソースに関する情報が出力されます。

# chronyc sources -v
210 Number of sources = 2

.-- Source mode  '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current synced, '+' = OK for sync, '?' = unreachable,
| /                'x' = time may be in error, '~' = time is too variable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||                                                /   xxxx = adjusted offset,
||         Log2(Polling interval) -.             |    yyyy = measured offset,
||                                  \            |    zzzz = estimated error.
||                                   |           |
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^+ ntp1.kometch.local            2  10   377   287  -1543us[-1543us] +/-   42ms
^* dns3.kometch.local            2  10   377   442  -7967ns[  +39us] +/-   33ms

chronydによって検討されているソースのそれぞれのドリフトレートと、推定されるオフセットプロセスに関する情報を出力します。

# chronyc sourcestats -v
210 Number of sources = 2
.- Number of sample points in measurement set.
/    .- Number of residual runs with same sign.
|    /    .- Length of measurement set (time).
|   |    /      .- Est. clock freq error (ppm).
|   |   |      /           .- Est. error in freq.
|   |   |     |           /         .- Est. offset.
|   |   |     |          |          |   On the -.
|   |   |     |          |          |   samples. \
|   |   |     |          |          |             |
Name/IP Address            NP  NR  Span  Frequency  Freq Skew  Offset  Std Dev
==============================================================================
ntp1.kometch.local          4   3   51m     -0.281      0.378  -1642us    29us
dns3.kometch.local          6   4   77m      0.040      0.179    +18us    66us

実行しているシステムのクロックに関してのパラメータが出力されます。

# chronyc tracking
Reference ID    : 192.168.1.224 (dns3.kometch.local)
Stratum         : 3
Ref time (UTC)  : Sat Jun 29 09:07:15 2013
System time     : 0.000012059 seconds slow of NTP time
Last offset     : -0.000022016 seconds
RMS offset      : 0.000158888 seconds
Frequency       : 27.682 ppm fast
Residual freq   : 0.008 ppm
Skew            : 0.118 ppm
Root delay      : 0.007585 seconds
Root dispersion : 0.016354 seconds
Update interval : 1028.6 seconds
Leap status     : Normal

configファイルの記述内容についてはntpdよりも簡単な感じはします。とりあえずホームユース向けで使用する文にはchronyでもいいんじゃないかなぁと思います。

この記事を書いた人

kometchtech

うつ病を患いながら、IT業界の末席にいるおっさんエンジニア。科学計算をしたことがないのに、HPC分野にお邪魔している。興味のある分野で学習したことをblogにまとめつつ、うつ病の経過症状のメモも置いておく日々。じつはRouterboard User Group JPの中の人でもある。 Amazon欲しいものリスト / Arm板を恵んでくれる人募集中

kometchtechをフォローする
タイトルとURLをコピーしました