0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ntpサーバ自身がntpdateで時刻合わせする方法

Last updated at Posted at 2013-11-25

不具合調査のため手元のproxmoxサーバーの時刻をちょくちょく変更するのですが、
ntpdateで戻そうとするとエラーが出ます。
proxmoxでntpサーバーが動いているからです。

その時はntpサーバーを停止してから実行すると良い。

# date -s "2013/11/19 20:01:00"
# date
2013年 11月 19日 火曜日 20:01:03 JST
# ntpdate ntp.ubuntu.com
19 Nov 20:23:05 ntpdate[663922]: the NTP socket is in use, exiting
# /etc/init.d/ntp stop
Stopping NTP server: ntpd.
# ntpdate ntp.ubuntu.com
26 Nov 07:26:18 ntpdate[664000]: step time server 91.189.94.4 offset 558161.549046 sec
# /etc/init.d/ntp start
Starting NTP server: ntpd.
# date
2013年 11月 26日 火曜日 07:26:24 JST

もしくはntpdate -u ntp.ubuntu.comで別ポートで時刻合わせすればよい。

@reboot /usr/sbin/ntpdate -u ntp.jst.mfeed.ad.jp
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?