{"id":1907,"date":"2015-06-29T02:27:16","date_gmt":"2015-06-28T17:27:16","guid":{"rendered":"http:\/\/tech.akat.info\/?p=1907"},"modified":"2015-07-02T21:43:22","modified_gmt":"2015-07-02T12:43:22","slug":"%e3%81%86%e3%82%8b%e3%81%86%e7%a7%92-%e4%bd%9c%e6%88%90%e4%b8%ad","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=1907","title":{"rendered":"\u3046\u308b\u3046\u79d2-2015"},"content":{"rendered":"<h1>\u3046\u308b\u3046\u79d2\u306b\u3064\u3044\u3066<\/h1>\n<p>\u3046\u308b\u3046\u79d2\u3068\u306f\u3001\u56fd\u969b\u539f\u5b50\u6642\u8a08(TAI)\u3068\u5929\u6587\u6642(UT)\u3068\u306e\u30ba\u30ec\u3092\u4fee\u6b63\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f<br \/>\n1972\u5e74\u304b\u3089\u3053\u306e7\u67081\u65e5\u307e\u3067\u306b\u300125\u56de\u5b9f\u65bd\u3055\u308c\u3066\u3044\u308b(\u3053\u308c\u307e\u3067\u306e\u3068\u3053\u308d25\u56de\u3059\u3079\u3066\u304c\u633f\u5165)<\/p>\n<p>\u6642\u9593\u3092\u633f\u5165\u3059\u308b\u5834\u5408<br \/>\n\u300c08:59:59\u300d\u2192\u300c08:59:60\u300d\u2192\u300c09:00:00\u300d<br \/>\n\u3068\u306a\u308b<br \/>\n\u5148\u9032\u56fd\u306f\u3046\u308b\u3046\u79d2\u3092\u7121\u304f\u3059\u65b9\u5411\u3067\u9032\u3081\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u304c\u3001\u6c7a\u5b9a\u3057\u3066\u3044\u306a\u3044<br \/>\n\u305f\u3068\u3048\u6c7a\u5b9a\u3057\u305f\u3068\u3057\u3066\u3082\u3042\u3068\u4f55\u56de\u304b\u306f\u3042\u308b\u4e88\u5b9a<\/p>\n<h1>\u904e\u53bb\u4e8b\u4f8b-2012<\/h1>\n<p>\u30fb24\u6642\u9593\u524d\u304b\u3089\u3001NTP(Network Time Protocol)\u7d4c\u7531\u306e\u3046\u308b\u3046\u79d2\u5b9f\u65bd\u4e88\u544a\u3092\u53d7\u3051\u53d6\u3063\u305f<br \/>\n\u3000Linux\u30d9\u30fc\u30b9\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u52d5\u4f5c\u306b\u7570\u5e38\u304c\u3042\u308a\u3001\u518d\u8d77\u52d5\u304c\u5fc5\u8981\u306b\u306a\u3063\u305f<br \/>\n\u30fbLinux\u30ab\u30fc\u30cd\u30eb\u306e\u4e00\u90e8\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3046\u308b\u3046\u79d2\u633f\u5165\u5f8c\u306bCPU\u4f7f\u7528\u7387\u304c\u4e0a\u6607\u3057\u305f<\/p>\n<p>\u524d\u8005\u306f\u3001NTP\u306e\u4e0d\u5177\u5408<\/p>\n<p>\u5f8c\u8005\u306f\u3001\u3046\u308b\u3046\u79d2\u306e\u51e6\u7406\u6642\u306bclock_was_set()\u3092\u547c\u3093\u3067\u306a\u3044\u306a\u304b\u3063\u305f\u305f\u3081<br \/>\nfutex(ast Userspace Mutex) \u95a2\u9023\u306e\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u304c\u5927\u91cf\u306b\u767a\u751f\u3057\u305f\u3053\u3068\u304c\u539f\u56e0\u3002<br \/>\nMutex\u3068\u306f\u30de\u30eb\u30c1\u30bf\u30b9\u30af\u30b7\u30b9\u30c6\u30e0\u306b\u304a\u3044\u3066\u3001<br \/>\n\u3042\u308b\u77ac\u9593\u306b\u3042\u308b1\u3064\u306e\u30d7\u30ed\u30bb\u30b9(\u30b9\u30ec\u30c3\u30c9)\u3060\u3051\u304c\u7279\u5b9a\u306e\u30c7\u30fc\u30bf\u3092\u64cd\u4f5c\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u6280\u8853<\/p>\n<p>clock_was_set() \u306f\u6642\u523b\u304c\u5909\u66f4\u3057\u305f\u3053\u3068\u3092hrtimer(\u30ab\u30fc\u30cd\u30eb\u3067\u9ad8\u7cbe\u5ea6\u30bf\u30a4\u30de\u30fc\u3092\u5b9f\u73fe\u3059\u308b\u4ed5\u7d44\u307f)\u306b\u901a\u77e5\u3057\u3066\u3044\u308b<br \/>\nv2.6.22 \u4ee5\u964d\u306e\u30ab\u30fc\u30cd\u30eb\u3067\u3046\u308b\u3046\u79d2\u51e6\u7406\u306e\u4e2d\u3067clock_was_set() \u3092\u547c\u3070\u306a\u304f\u306a\u3063\u3066\u304a\u308a\u3001<br \/>\n\u30ab\u30fc\u30cd\u30eb\u3067\u30bf\u30a4\u30de\u30fc\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306e\u6642\u8a08\u3068\u3001\u30b7\u30b9\u30c6\u30e0\u30af\u30ed\u30c3\u30af\u304c1\u79d2\u305a\u308c\u305f\u305f\u3081\u3001\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u304c\u767a\u751f\u3057\u305f\u3089\u3057\u3044<\/p>\n<h1>ntp\u3067\u306eLeap Indicator\u78ba\u8a8d\u65b9\u6cd5<\/h1>\n<p>Linux\u30ab\u30fc\u30cd\u30eb\u306b\u304a\u3044\u3066\u3001\u4e8b\u524d\u306bLeap Indicator\u3092\u53d7\u4fe1\u3059\u308b<br \/>\nNTP\u306b\u3088\u3063\u3066\u3046\u308b\u3046\u79d2\u306e\u60c5\u5831\u304c\u4f1d\u308f\u3063\u3066\u304d\u3066\u3044\u308b\u304b\u306e\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd<br \/>\n \u300000 \u8abf\u6574\u306f\u767a\u751f\u3057\u307e\u305b\u3093<br \/>\n \u300001 \u6b63\u306e\u8abf\u6574\u304c\u767a\u751f<br \/>\n \u300010 \u8ca0\u8abf\u6574\u304c\u767a\u751f<br \/>\nroot@vmdepot-debia:\/etc# ntpq -c rv | grep &#8220;leap=&#8221;<br \/>\nprocessor=&#8221;x86_64&#8243;, system=&#8221;Linux\/3.2.0-4-amd64&#8243;, leap=00, stratum=3,<\/p>\n<h1>Linux\u3067\u8a66\u3057\u306b\u6642\u9593\u3092\u9032\u3081\u3066\u307f\u305f<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@hostname:\/home\/shimizu# cat gettimeofday.pl\r\nuse POSIX;\r\nuse Time::HiRes qw(gettimeofday sleep);\r\n\r\nwhile(&quot;You hate leapseconds&quot;){\r\n        my ($sec, $usec) = gettimeofday;\r\n        printf(&quot;%s.%06d\\n&quot;, POSIX::strftime('%H:%M:%S', localtime($sec)), $usec);\r\n        sleep(0.1)\r\n}\r\nroot@hostname:\/home\/shimizu# date --set=&quot;2015\/7\/1 8:59&quot;\r\nroot@hostname:\/home\/shimizu# perl .\/gettimeofday.pl\r\n08:59:58.801939\r\n08:59:58.902272\r\n08:59:59.002524\r\n08:59:59.102761\r\n08:59:59.203031\r\n08:59:59.303351\r\n08:59:59.403578\r\n08:59:59.503831\r\n08:59:59.604098\r\n08:59:59.704361\r\n08:59:59.804660\r\n08:59:59.904920\r\n09:00:00.005171\r\n09:00:00.105432\r\n<\/pre>\n<h1>\u5f8c\u65e5\u8ac7<\/h1>\n<h2>\u305d\u306e\u3044\u3061<\/h2>\n<p>debian7,8\u306b\u3066\u30019\u6642\u76f4\u524d\u306bntpd\u3092\u505c\u6b62\u3057\u305f\u304c\u300c8:59:59\u300d\u304c2\u56de\u767a\u751f\u3057\u305f<br \/>\n\u3059\u3067\u306bLeap Indicator\u3092\u30ab\u30fc\u30cd\u30eb\u306b\u4f1d\u3048\u3066\u3044\u305f\u305f\u3081<br \/>\nntptime -s 0<br \/>\n\u3092\u5b9f\u65bd\u3057\u3066\u3001\u30ab\u30fc\u30cd\u30eb\u306e\u72b6\u614b\u3092\u30af\u30ea\u30a2\u3059\u308b\u3079\u304d\u3060\u3063\u305f<\/p>\n<h2>\u305d\u306e\u306b<\/h2>\n<p>ntpd\u304c\u5165\u3063\u3066\u3044\u306a\u304f\u3066\u3082\u3001\u6700\u65b0\u306etzdata\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u9069\u5fdc\u3055\u308c\u3066\u3044\u308c\u3070<br \/>\n\u300c08:59:60\u300d\u304c\u30ab\u30a6\u30f3\u30c8\u3055\u308c\u308b\u3068\u3044\u3046\u60c5\u5831\u304c\u3042\u3063\u305f<br \/>\nntpd\u304c\u5165\u3063\u3066\u304a\u3089\u305a\u3001\u6700\u65b0\u306etzdata\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u9069\u7528\u3055\u308c\u3066\u3044\u308b\u30b5\u30fc\u30d0\u304c\u3042\u3063\u305f\u304c<br \/>\n\u300c08:59:60\u300d\u304c\u30ab\u30a6\u30f3\u30c8\u3055\u308c\u308b\u3053\u3068\u306f\u306a\u304b\u3063\u305f<br \/>\n\u666e\u901a\u306b\u300c08:59:58\u300d\u2192\u300c08:59:59\u300d\u2192\u300c09:00:00\u300d\u3068\u30ab\u30a6\u30f3\u30c8\u3055\u308c\u305f<br \/>\n\u3053\u306e\u60c5\u5831\u306e\u771f\u610f\u306f\u308f\u304b\u3089\u306a\u304b\u3063\u305f<\/p>\n<h1>Windows<\/h1>\n<p>Windows\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u3001\u3046\u308b\u3046\u79d2\u306e\u51e6\u7406\u3092\u304a\u3053\u306a\u308f\u306a\u3044<br \/>\n\u306a\u304a\u3001\u3046\u308b\u3046\u79d2\u304c\u767a\u751f\u3057\u305f\u77ac\u9593\u306f\u3001\u3046\u308b\u3046\u79d2\u3092\u5bfe\u5fdc\u3057\u3066\u3044\u308bNTP \u30b5\u30fc\u30d0\u30fc\u306b\u5bfe\u3057\u3066\u30011 \u79d2\u306e\u6642\u523b\u5dee\u7570\u304c\u751f\u3058\u308b<br \/>\n\u305d\u306e\u5f8c\u306e\u6642\u523b\u540c\u671f\u306b\u3066\u6b63\u5e38\u306a\u6642\u523b\u306b\u88dc\u6b63\u3059\u308b<\/p>\n<h1>\u53c2\u8003URL<\/h1>\n<p>2012 \u5e74 7 \u6708 1 \u65e5\u306e\u3046\u308b\u3046\u79d2\u633f\u5165\u6642\u306b\u767a\u751f\u3057\u305f Linux \u30ab\u30fc\u30cd\u30eb\u306e\u4e0d\u5177\u5408\u306b\u95a2\u3059\u308b\u60c5\u5831<br \/>\nhttp:\/\/ringeye.jawfish.org\/~ori\/misc\/leapsecond-20120701.html<br \/>\n\u3046\u308b\u3046\u79d2\u306b\u95a2\u3059\u308b\u30b5\u30dd\u30fc\u30c8\u306b\u3064\u3044\u3066<br \/>\nhttps:\/\/support.microsoft.com\/en-us\/kb\/2722715\/ja<br \/>\n2015\/07\/01 \u3046\u308b\u3046\u79d2\u5bfe\u7b56\u3000\u307e\u3068\u3081<br \/>\nhttp:\/\/ex1.m-yabe.com\/archives\/1000<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3046\u308b\u3046\u79d2\u306b\u3064\u3044\u3066 \u3046\u308b\u3046\u79d2\u3068\u306f\u3001\u56fd\u969b\u539f\u5b50\u6642\u8a08(TAI)\u3068\u5929\u6587\u6642(UT)\u3068\u306e\u30ba\u30ec\u3092\u4fee\u6b63\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f 1972\u5e74\u304b\u3089\u3053\u306e7\u67081\u65e5\u307e\u3067\u306b\u300125\u56de\u5b9f\u65bd\u3055\u308c\u3066\u3044\u308b(\u3053\u308c\u307e\u3067\u306e\u3068\u3053\u308d25\u56de\u3059\u3079\u3066\u304c\u633f\u5165) \u6642\u9593\u3092\u633f\u5165\u3059\u308b\u5834\u5408 \u300c0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/1907"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1907"}],"version-history":[{"count":5,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/1907\/revisions"}],"predecessor-version":[{"id":1916,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/1907\/revisions\/1916"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}