{"id":630,"date":"2026-07-26T10:04:11","date_gmt":"2026-07-26T01:04:11","guid":{"rendered":"https:\/\/www.marchboy.xyz\/wordpress\/archives\/630"},"modified":"2026-07-26T10:04:11","modified_gmt":"2026-07-26T01:04:11","slug":"timedatectl-show-timesync-%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%ae%e5%be%b9%e5%ba%95%e8%a7%a3%e8%aa%ac","status":"publish","type":"post","link":"https:\/\/www.marchboy.xyz\/wordpress\/archives\/630","title":{"rendered":"timedatectl show-timesync \u30b3\u30de\u30f3\u30c9\u306e\u5fb9\u5e95\u89e3\u8aac"},"content":{"rendered":"<h2>\u6982\u8981<\/h2>\n<p>systemd \u306e <strong>timedatectl<\/strong> \u30b3\u30de\u30f3\u30c9\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u30af\u30ed\u30c3\u30af\u3068\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u306e\u7ba1\u7406\u3060\u3051\u3067\u306a\u304f\u3001NTP\uff08Network Time Protocol\uff09\u306b\u3088\u308b\u6642\u523b\u540c\u671f\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\u6a5f\u80fd\u3082\u63d0\u4f9b\u3057\u307e\u3059\u3002\u305d\u306e\u4e2d\u3067\u3082 <code>timedatectl show-timesync<\/code> \u306f\u3001NTP \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\uff08systemd-timesyncd \u306a\u3069\uff09\u306e\u8a73\u7d30\u60c5\u5831\u3092 JSON \u5f62\u5f0f\u3067\u51fa\u529b\u3059\u308b\u4fbf\u5229\u306a\u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002<\/p>\n<h2>\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/h2>\n<p>\u30b3\u30de\u30f3\u30c9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre><code>timedatectl show-timesync<\/code><\/pre>\n<p>\u5b9f\u884c\u3059\u308b\u3068\u3001\u73fe\u5728\u6709\u52b9\u306a\u30bf\u30a4\u30e0\u30b5\u30fc\u30d0\u30fc\u3084\u540c\u671f\u72b6\u614b\u3001\u6700\u65b0\u306e\u30aa\u30d5\u30bb\u30c3\u30c8\u60c5\u5831\u306a\u3069\u304c\u30ad\u30fc\u3068\u30d0\u30ea\u30e5\u30fc\u306e\u30da\u30a2\u3067\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>\u4e3b\u306a\u51fa\u529b\u9805\u76ee<\/h2>\n<ul>\n<li><strong>ServerName<\/strong>\uff1a\u73fe\u5728\u4f7f\u7528\u4e2d\u306e NTP \u30b5\u30fc\u30d0\u30fc\u306e\u30db\u30b9\u30c8\u540d\u307e\u305f\u306f\u30a2\u30c9\u30ec\u30b9\u3002<\/li>\n<li><strong>ServerAddress<\/strong>\uff1a\u30b5\u30fc\u30d0\u30fc\u306e IP \u30a2\u30c9\u30ec\u30b9\u3002<\/li>\n<li><strong>ServerPollIntervalUSec<\/strong>\uff1a\u6b21\u56de\u306e\u30dd\u30fc\u30ea\u30f3\u30b0\u307e\u3067\u306e\u9593\u9694\uff08\u30de\u30a4\u30af\u30ed\u79d2\uff09\u3002<\/li>\n<li><strong>ServerAccuracyUSec<\/strong>\uff1a\u30b5\u30fc\u30d0\u30fc\u304c\u5831\u544a\u3059\u308b\u6700\u5927\u8aa4\u5dee\uff08\u30de\u30a4\u30af\u30ed\u79d2\uff09\u3002<\/li>\n<li><strong>ServerLeap<\/strong>\uff1a\u30b5\u30fc\u30d0\u30fc\u306e\u3046\u308b\u3046\u79d2\u60c5\u5831\uff08\u201cyes\u201d, \u201cno\u201d, \u201cunknown\u201d\uff09\u3002<\/li>\n<li><strong>NTPSynchronized<\/strong>\uff1a<code>yes<\/code> \u3067\u3042\u308c\u3070\u6642\u523b\u304c NTP \u3068\u540c\u671f\u4e2d\u3002<\/li>\n<li><strong>NTPSyncTimeUSec<\/strong>\uff1a\u6700\u5f8c\u306b\u540c\u671f\u304c\u6210\u529f\u3057\u305f\u6642\u523b\uff08UNIX epoch \u30de\u30a4\u30af\u30ed\u79d2\uff09\u3002<\/li>\n<li><strong>TimeUSec<\/strong>\uff1a\u73fe\u5728\u306e\u30b7\u30b9\u30c6\u30e0\u6642\u523b\uff08UNIX epoch \u30de\u30a4\u30af\u30ed\u79d2\uff09\u3002<\/li>\n<li><strong>RTCTimeUSec<\/strong>\uff1a\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u6642\u8a08\uff08RTC\uff09\u306e\u6642\u523b\u3002<\/li>\n<\/ul>\n<h2>\u51fa\u529b\u4f8b<\/h2>\n<pre><code>ServerName=ntp.ubuntu.com\nServerAddress=91.189.94.4\nServerPollIntervalUSec=64000000\nServerAccuracyUSec=1000000\nServerLeap=no\nNTPSynchronized=yes\nNTPSyncTimeUSec=1722456789123456\nTimeUSec=1722456890123456\nRTCTimeUSec=1722456889123456<\/code><\/pre>\n<p>\u4e0a\u8a18\u306f\u6539\u884c\u3067\u533a\u5207\u3089\u308c\u305f <code>key=value<\/code> \u5f62\u5f0f\u3067\u3059\u304c\u3001<code>--output=json<\/code> \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u4e0e\u3059\u308c\u3070 JSON \u306b\u5909\u63db\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>JSON \u5f62\u5f0f\u3067\u53d6\u5f97\u3059\u308b\u65b9\u6cd5<\/h2>\n<pre><code>timedatectl show-timesync --output=json<\/code><\/pre>\n<p>\u51fa\u529b\u4f8b:<\/p>\n<pre><code>{\n  \"ServerName\": \"ntp.ubuntu.com\",\n  \"ServerAddress\": \"91.189.94.4\",\n  \"ServerPollIntervalUSec\": \"64000000\",\n  \"ServerAccuracyUSec\": \"1000000\",\n  \"ServerLeap\": \"no\",\n  \"NTPSynchronized\": \"yes\",\n  \"NTPSyncTimeUSec\": \"1722456789123456\",\n  \"TimeUSec\": \"1722456890123456\",\n  \"RTCTimeUSec\": \"1722456889123456\"\n}<\/code><\/pre>\n<h2>\u5b9f\u52d9\u3067\u306e\u6d3b\u7528\u4f8b<\/h2>\n<ul>\n<li>\u76e3\u8996\u30b9\u30af\u30ea\u30d7\u30c8\u3067 <code>NTPSynchronized<\/code> \u304c <code>yes<\/code> \u304b\u78ba\u8a8d\u3057\u3001\u540c\u671f\u304c\u5916\u308c\u305f\u5834\u5408\u306b\u30a2\u30e9\u30fc\u30c8\u3092\u4e0a\u3052\u308b\u3002<\/li>\n<li>\u5b9a\u671f\u7684\u306b <code>ServerOffsetUSec<\/code>\uff08\u5b58\u5728\u3059\u308c\u3070\uff09\u3092\u53d6\u5f97\u3057\u3001\u30b5\u30fc\u30d0\u30fc\u3068\u306e\u6642\u523b\u30ba\u30ec\u3092\u6570\u5024\u5316\u3057\u3066\u30ed\u30b0\u306b\u6b8b\u3059\u3002<\/li>\n<li>\u8907\u6570\u306e\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u74b0\u5883\u3067\u306f\u3001<code>ServerName<\/code> \u3068 <code>ServerAddress<\/code> \u3092\u6bd4\u8f03\u3057\u3001DNS \u306e\u5207\u308a\u66ff\u3048\u304c\u6b63\u3057\u304f\u6a5f\u80fd\u3057\u3066\u3044\u308b\u304b\u691c\u8a3c\u3059\u308b\u3002<\/li>\n<\/ul>\n<h2>\u3088\u304f\u3042\u308b\u8cea\u554f<\/h2>\n<h3>1. \u51fa\u529b\u306b\u671f\u5f85\u3057\u305f\u9805\u76ee\u304c\u7121\u3044\u5834\u5408\u306f\uff1f<\/h3>\n<p>systemd \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3084\u4f7f\u7528\u3057\u3066\u3044\u308b NTP \u30c7\u30fc\u30e2\u30f3\uff08systemd-timesyncd, chrony, ntpd \u306a\u3069\uff09\u306b\u3088\u308a\u53d6\u5f97\u3067\u304d\u308b\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u7570\u306a\u308a\u307e\u3059\u3002<code>systemctl status systemd-timesyncd<\/code> \u3067\u30b5\u30fc\u30d3\u30b9\u304c\u6709\u52b9\u304b\u78ba\u8a8d\u3057\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>2. NTP \u30b5\u30fc\u30d0\u30fc\u3092\u624b\u52d5\u3067\u5909\u66f4\u3057\u305f\u3044<\/h3>\n<p>\u8a2d\u5b9a\u306f <code>\/etc\/systemd\/timesyncd.conf<\/code> \u306e <code>[Time]<\/code> \u30bb\u30af\u30b7\u30e7\u30f3\u3067 <code>FallbackNTP=<\/code> \u3082\u3057\u304f\u306f <code>NTP=<\/code> \u306b\u30b5\u30fc\u30d0\u30fc\u30ea\u30b9\u30c8\u3092\u8a18\u8ff0\u3057\u3001<code>systemctl restart systemd-timesyncd<\/code> \u3067\u53cd\u6620\u3055\u305b\u307e\u3059\u3002\u305d\u306e\u5f8c <code>timedatectl show-timesync<\/code> \u3067\u65b0\u3057\u3044\u30b5\u30fc\u30d0\u30fc\u304c\u53cd\u6620\u3055\u308c\u305f\u304b\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 systemd \u306e timedatectl \u30b3\u30de\u30f3\u30c9\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u30af\u30ed\u30c3\u30af\u3068\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u306e\u7ba1\u7406\u3060\u3051\u3067\u306a\u304f\u3001NTP\uff08Network Time Protocol\uff09\u306b\u3088\u308b\u6642\u523b\u540c\u671f\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\u6a5f\u80fd\u3082\u63d0\u4f9b\u3057\u307e\u3059\u3002\u305d\u306e\u4e2d\u3067\u3082 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-630","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/630","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/comments?post=630"}],"version-history":[{"count":0,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/630\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/media?parent=630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/categories?post=630"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/tags?post=630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}