[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debian-users:22969] Re: hwclock can't terminate some PC(was Re: Re: unable to complete shutdown, problem of hwclock?)



こんにちは。松田陽一@PAL-NET三鷹です。

From: Taketoshi Sano <kgh12351@xxxxxxxxxxx>
Subject: [debian-users:22964] Re: hwclock can't terminate some PC(was Re: Re: unable to complete shutdown, problem of hwclock?)
Date: Mon, 26 Jun 2000 20:59:52 +0900

> 佐野@浜松です。

どうもです。^^

>  2.2.15 と 2.2.16 で kernel の config は同じ内容のはずなんですよね ?
> なにか 2.2.16 で新規追加された設定項目はありませんか ?

いえ、何もないです。
少なくとも、

General setup
Plug and Play support
Block devices
Networking options
SCSI support
Network device support
Character devices

この辺はいじった記憶がないです。

> > 私の場合、 hwclock が正常終了すれば、上述のログのように、 local time
> > に設定されていても正しい時刻が書き込まれます。
> > あくまでも「正常終了すれば」の話ですが。
> 
> もしかして 9 時間待ってみたら終了するとかいうことではないんですよね ?
> 
>  (って、それを試しに確認してみるのも大変だよなあ)

既に試しました。^^;
 9時間どころか、3 日経っても終了してくれませんでした。

> 谷川さんから RTC を UTC で使っていれば 2.2.16 + SMP でも問題無いと
> いうレポートがあったので、もしかするとカーネル内部で RTC を扱う場合
> にデフォルト UTC にするという設定か何かあって、そのへんが hwclock の
>  RTC が localtime だという前提と食い違っておかしくなるのかな、とか
> 想像したもので。

なるほど、UTC ですか、了解です。
っつっても、LAN 内のマシンなんで、UTC にする必要性があるかどうか…。

> 直接関係の無いところで 2.2.16 のコードに何か RTC の値を変化させてしまう
> ものがあるのかも。やっぱり hwclock --show を起動時のいろんなところに
> 入れて、どこで変化するのか調べるのが早いかもしれない。

了解です。
cron.daily 辺りにも埋め込んでみようかと思います。

> > ところで…
> > hwclock って、ハードウェアクロックが余りにもずれていると、修正できない
> > 代物なのでしょうか?
> 
> こっちは arch/i386/kernel/time.c を読むと
> 
> /*
>  * In order to set the CMOS clock precisely, set_rtc_mmss has to be
>  * called 500 ms after the second nowtime has started, because when
>  * nowtime is written into the registers of the CMOS clock, it will
>  * jump to the next second precisely 500 ms later. Check the Motorola
>  * MC146818A or Dallas DS12887 data sheet for details.
>  *
>  * BUG: This routine does not handle hour overflow properly; it just
>  *      sets the minutes. Usually you'll only notice that after reboot!
>  */
> 
>         /*
>          * since we're only adjusting minutes and seconds,
>          * don't interfere with hour overflow. This avoids
>          * messing with unknown time zones but requires your
>          * RTC not to be off by more than 15 minutes
>          */
> 
> などと書かれているので、すくなくとも i386 上では時間単位のズレは
> 無視するし、また RTC と system time のズレが 15 分以内であること
> を必要とするみたいです。コメントだけを見ての判断なので実際のコード
> とはもしかしたら違うかもしれませんが。

うげげ。
じゃぁ、マシン稼働中はシステム時刻をハードウェアクロックに合わせ
込むことができない、ってことですか?
んー、それって何か変ですねぇ…。
CMOSクロックの電池切れで、何百年単位でずれてたらどうするんだろう?
15分ずつ延々と修正を繰り返して行くとか…。^^;
--
ぱらっぱら ぱらっぱら ぱらっぱらっぱっぱ♪
松田 陽一(yoh)
mailto:matsuda@xxxxxxxxxxxx
http://www2.palnet.or.jp/~matsuda/index.htm