| ページ一覧 | ブログ | twitter |  書式 | 書式(表) |

MyMemoWiki

Linux 時刻あわせ

提供: MyMemoWiki
ナビゲーションに移動 検索に移動

Linux 時刻あわせ

NTPサーバを利用して時刻合わせ。 公開NTPサーバ

時刻合わせ
#ntpq -p ntp.nc.u-tokyo.ac.jp
remote refid st t when poll reach delay offset jitter
==============================================================================
*GPS_NMEA(1) .GPS. 0 l - 64 377 0.000 -0.025 0.010
+gate.keisu.t.u- .GPS. 1 u 24 64 376 0.457 -0.047 0.039
+clk.notemachi.w 130.69.251.23 2 u 2 64 377 15.299 -0.003 0.048
時刻合わせ
# ntpdate -s ntp.nc.u-tokyo.ac.jp    
# ntpdate ntp.nc.u-tokyo.ac.jp
26 May 01:10:04 ntpdate[14900]: step time server 130.69.251.23 offset 24.199100 sec
# hwclock --show
2007年05月26日 01時10分08秒 -0.751343 seconds
# date
2007年 5月 26日 土曜日 01:10:52 JST

タイムゾーン

日本標準時に設定
# export TZ=JST-9
再起動しても JST で表示させる
# cp /usr/share/zoneinfo/Japan /etc/localtime