翻訳内容は無保証。質問禁止。悪評禁止。 ADJTIMEX(8) ADJTIMEX(8) NAME adjtimex - display or set the kernel time variables カーネル時間変数の表示または設定を行う SYNOPSIS adjtimex [option]... DESCRIPTION This program gives you raw access to the kernel time vari- ables. For a machine connected to the Internet, or equipped with a precision oscillator or radio clock, the best way to regulate the system clock is with ntpd(8). For a standalone or intermittently connected machine, you may use adjtimex instead to at least correct for system- atic drift. 本プログラムは、カーネル時間変数への直接的なアクセス手段を提供 します。インターネットに接続した、あるいは正確なオシロあるいは ラジオ時計を具備したマシンにとって、システム時刻を設定する最良 の方法は、ntpd(8)を使うことです。スタンドアローンのマシンや、 時々メットワークに接続するようなマシンでは、少くとも、システム 的なドリフトを直すよりは、adjtimexを使ったほうが良いでしょう。 Anyone may print out the time variables, but only the superuser may change them. 誰でも、時間変数を見れますが、修正できるのはスーパーユーザだけ です。 If your computer can be connected to the net, you might run ntpd for at least several hours and use adjtimex -- print to learn what values of tick and freq it settled on. Alternately, you could estimate values using the CMOS clock as a reference (see the compare and adjust switches). You could then add a line to rc.local invoking adjtimex to set those parameters each time you reboot. もし、あなたのコンピュータがネットワークに接続しているのであれ ば、少なくとも数時間はntpdを走らせて、adjtimex -printを使うと 良いでしょう。設定されているtickやfreqの値を知ることができます。 あるいは、CMOS時計を使うことで値を推測することもできます (compare, adjustを見なさい)。 adjtimexを含む行をrc.local に加 えることで、リブート時にそれぞれの時間をセットすることができま す。 OPTIONS Options may be introduced by either or , and unique abbreviations may be used. Here is a summary of the options, grouped by type. Explanations follow. ここでは、タイプごにグループ化したオプションのサマリを紹介しま す。 Get/Set Kernel Time Parameters カーネル時間パラメータの取得と設定 -p -print -t -tick val -f newfreq -frequency newfreq -o val -offset val -s adjustment -- singleshot adjustment -m val -maxerr val -e val -- esterror val -T val -timeconstant val -a[count] -- adjust[=count] Estimate Systematic Drifts システムドリフトの推測 -c[count] -compare[=count] -i tim -interval tim -l file -logfile file -h timeserver -host timeserver -w -watch -r[file] -review[=file] -u -utc Informative Output 有益な情報 -help -v -version -p, -print Print the current values of the kernel time variables. NOTE: The time is "raw", and may be off by up to one timer tick (10 msec). "status" gives the value of the time_status variable in the kernel. For Linux 1.0 and 1.2 kernels, the value is as follows: カーネル時間情報の現在値の表示。注意:この時間は「生」 で、1タイマクロック(10ms)単位の離散があるかもしれませ ん。"status"は、カーネルのtime_statusの値を与えます。 Linux 1.0あるいは1.2のカーネルでは、その値は以下のよう になります。 0 clock is synchronized (so the kernel should periodically set the CMOS clock to match the system clock) 時計は同期している(そして、カーネルは定期的に CMOS時間をセットして、システム時間とマッチして いる) 1 inserting a leap second at midnight 0時に閏秒を追加する。 2 deleting a leap second at midnight 0時に閏秒を削除する。 3 leap second in progress 進行中の閏秒 4 leap second has occurred 閏秒が発生した 5 clock not externally synchronized (so the kernel should leave the CMOS clock alone) 時計は外部的には同期していない(ので、カーネル は、CMOSクロックをほったらかしにしている) For Linux 2.0 kernels, the value is a sum of these: Linuxカーネル2.0では、値は以下の合計値となる 1 PLL updates enabled PLLの更新 オン 2 PPS freq discipline enabled PPS freq 学習オン 4 PPS time discipline enabled PPS time学習 オン 8 frequencylock mode enabled frequencylock mode オン 16 inserting leap second 閏秒を追加 32 deleting leap second 閏秒を削除 64 clock unsynchronized 時計非同期 128 holding frequency 周波数保持(?) 256 PPS signal present PPS信号状態 512 PPS signal jitter exceeded PPS信号ジッタ超過(?) 1024 PPS signal wander exceeded PPS信号ウネリ(?) 2048 PPS signal calibration error PPS信号ウネリ(?) 4096 clock hardware fault クロックハードウェア障害 -t val, -tick val Set the number of microseconds that should be added to the system time for each kernel tick interrupt. There are supposed to be 100 ticks per second, so val should be close to 10000. Increasing val by 1 speeds up the system clock by about 100 ppm, or 8.64 sec/day. tick must be in the range 9000...11000 on Intel systems, or 900...1100 on Alpha systems. 各々のカーネルtick割り込みのためのシステム時刻に追加さ れるべきミリ秒の値をセットします。 一秒間に100tickとすると、valは、10000に近くなります。1 追加するごとに、システム時計は100ppm(8.64秒/日)ごとに 早くなります。tickの範囲は、インテルで9000-110000、ア ルファで、900-1100です。 -f newfreq, -frequency newfreq Set the system clock frequency offset to newfreq. newfreq can be negative or positive, and gives a much finer adjustment than the -tick switch. The value is scaled such that newfreq = 1<<16 speeds up the system clock by about 1 ppm, or .0864 sec/day. Thus, tick 10000 -frequency 6553600 is about the same as tick 10001 frequency 0. newfreq must be in the range 6553600...6553600, allowing maximum adjustments of plus or minus 100 ppm. システム時計周波数オフセットをnewfreqにセットします。 nwefreqは、プラスマイナス値が入力可能で、"-tick"を使う より、もっと正確な調整ができます。値のスケールは、 newfreq = 1<<16 で、システム時計を1ppm 0.864秒/日進め ます。従って、tick 10000 -frequency 6554600は、 tick10001 frequency 0と同じです。 newfreqの範囲は6553600...6553600で、プラスマイナス 100ppmの最大調整値が許されています。 -s adj, -singleshot adj Slew the system clock by adj usec. (Its rate is changed temporarily by about 1 part in 2000.) adj usec.によってシステムクロックを圧倒しまのレートは、2000年におよそ1つの一部によって一時的に 変更されます)(意味不明) -o adj, -offset adj Add a time offset of adj usec. The kernel code adjusts the time gradually by adj, notes how long it has been since the last time offset, and then adjusts the frequency offset to correct for the apparent drift. adj must be in the range 512000...512000. adj usecの時間オフセットを加えます。 カーネル・コードは、adjによって徐々に時間を調節し、 前回の時間のオフセット以後、どの位長い時間たったかを 記録し、明白なドリフトを修正するために、周波数オフセッ トの調整を行う。 adjの範囲は512000...512000. -m val, -maxerror val Set maximum error (usec). 最大エラー(マイクロ秒)をセットします。 -e val, -esterror val Set estimated error (usec). The maximum and estimated error are not used by the kernel. They are merely made available to user processes via the adjtimex(2) system call. 推定エラー(マイクロ秒)をセットします。最大および推測エ ラーは、カーネルでは使用されません。それらは、単に adjtimexシステムコールを経て、ユーザプロセスで使われる ことができるだけです。 -t val, -timeconstant val Set phase locked loop (PLL) time constant. val determines the bandwidth or "stiffness" of the PLL. The effective PLL time constant will be a multiple of (1 << val). For roomtemperature quartz oscillators, David Mills recommends the value 2, which corresponds to a PLL time constant of about 900 sec and a maximum update interval of about 64 sec. The maximum update interval scales directly with the time constant, so that at the maximum time constant of 6, the update interval can be as large as 1024 sec. フェーズロックループ(PLL)時間定数をセットします。 valは、PLLの帯域あるいは「硬度」を決定します。 効率的なPLL時間定数は、効果的PLL時定数は、(1 << val)の 倍数となるでしょう。室温、水晶、発振器のために、デビッ ト・ミルズは、2の値を推奨しています。それは、約900秒の PLL時間定数と、約64秒の最大更新間隔に関連しています。 最大更新間隔は、直接時定数を調整し、6の最大時定数の時 に、その更新間隔は、1024秒まで大きくなります。 Values of val between zero and 2 give quick convergence; values between 2 and 6 can be used to reduce network load, but at a modest cost in accuracy. 0から2のvalueの値によって、高速な収束がなされます。 2から6の値は、ネットワーク負荷を減らしますが、正確にお いて控え目になります。 -c[count], -compare[=count] Periodically compare the system clock with the CMOS clock. After the first two calls, print values for tick and frequency offset that would bring the system clock into approximate agreement with the CMOS clock. CMOS clock readings are adjusted for systematic drift using using the correction in /etc/adjtime see hwclock(8). The interval between comparisons is 10 seconds, unless changed by the -- interval switch. The optional argument is the number of comparisons. (If the argument is supplied, the "=" is required.) -a[count], -adjust[=count] By itself, same as compare, except the recommended values are actually installed after every other comparison. With review, the tick and frequency are set to the leastsquares estimates. (In the latter case, any count value is ignored.) 推奨値が、それぞれの他の比較の後で実際にインストールさ れることを期待します。このレビューによって、tickと frequencyは、最小自乗にセットされます。(後者の例では、 count値は無視されます) -i tim, -interval tim Set the interval in seconds between clock comparisons for the compare and adjust options. 比較と調整のオプションの為にクロック比較間の秒の間隔を セットします(意味不明) -u, -utc The CMOS clock is set to UTC (universal time) rather than local time. CMOS時計にローカル時刻でなく、UCTをセットします。 -l[file], -log[=file] Save the current values of the system and CMOS clocks, and optionally a reference time, to file (default /var/log/clocks.log). The reference time is taken from a network timeserver (see the host switch) or supplied by the user (see the watch switch). 現在値のシステムとCMOS時計と、適した参照時刻をファイル (default /var/log/clocks.log)に記録します。参照時刻は、 ネットワークのタイムサーバから得られるか、ユーザより提 供されます。 -h timeserver, -host timeserver Use ntpdate to query the given timeserver for the current time. This will fail if timeserver is not running a Network Time Protocol (NTP) server, or if that server is not synchronized. Implies log. 現在時刻のための既存のタイムサーバ参照するために、 ntpdateを使います。タイムサーバが起動していないか、同 期していなければ、失敗します。 -w, watch Ask for a keypress when the user knows the time, then ask what that time was, and its approximate accuracy. Implies log. ユーザが時刻を知っているときに、キーの投入を要求し、 時間を尋ねます。 r[file], -review[=file] Review the clock log file (default /var/log/clocks.log) and estimate, if possible, the rates of the CMOS and system clocks. Calculate leastsquares rates using all suitable log entries. Suggest corrections to adjust for systematic drift. With adjust, the frequency and tick are set to the suggested values. (The CMOS clock correction is not changed.) クロックログファイル(default /var/log/clocks.log)を見 ます。もし可能であれば、そのシステムとCMOS時刻の比率を 推測します。全ての適当なログエントリを使って、最小自乗 誤差算出します。システム的なドリフトを調整するために、 修正を提案し、修正とともに、frequencyとtickが、提案さ れた値にセットされる。(CMOS修正は変更されない) -h, -help Print the program options. オプションの内容を表示します。 -v, -version Print the program version. バージョンを表示します。 EXAMPLES If your system clock gained 8 seconds in 24 hours, you could set the tick to 9999, and then it would lose 0.64 seconds a day (that is, 1 tick unit = 8.64 seconds per day). To correct the rest of the error, you could set the frequency offset to (1<<16)*0.64/.0864 = 485452. Thus, putting the following in rc.local would approximately correct the system clock: adjtimex tick 9999 freq 485452 もしシステムク時計が、24時間で8秒狂うのであれば、tickを9999に セットしなさい。一日に0.64秒減ります(1 tick unit は、一日に 8.64秒となる)。 [訳者注 9999は、10000-1で、tick -1 の意味となるのだろう、多分] その残りのエラーを補正するには、frequencyオフセットを (1<<16)*0.64/.0864 = 485452 とセットしなさい。 8 - 8.64 = - 0.64 65536 * 0.64 / 0.0846 = 485452 とまあ、これをrc.localに入れることによって、システム時計の適当 な調整が可能になります。 NOTES adjtimex adjusts only the system clock the one that runs while the computer is powered up. To set or regulate the CMOS clock, see hwclock(8). adjtimexは、コンピュータが稼働している間のシステム時計だけを調 整します。CMOS時計を調整したければ、hwclockを使って下さい。 AUTHORS Steven S. Dick , Jim Van Zandt . SEE ALSO date(1L), gettimeofday(2), settimeofday(2), hwclock(8), ntpdate(8), ntpd(8), /usr/src/linux/include/linux/timex.h, /usr/src/linux/include/linux/sched.h, /usr/src/linux/kernel/time.c, /usr/src/linux/kernel/sched.c October 24, 1998 ADJTIMEX(8)