{"id":477,"date":"2011-01-28T00:30:38","date_gmt":"2011-11-27T21:51:50","guid":{"rendered":"http:\/\/kraftek.com\/blog\/setting-a-local-ntp-server-and-client\/"},"modified":"2011-01-28T00:30:38","modified_gmt":"2011-11-27T21:51:50","slug":"setting-a-local-ntp-server-and-client","status":"publish","type":"post","link":"\/blog\/index.php\/setting-a-local-ntp-server-and-client\/","title":{"rendered":"Setting a local NTP server and client"},"content":{"rendered":"<p>You want to synchronize your solaris servers? don&#8217;t have access to an atomic clock?<br \/>\nYou must pick one of your solaris servers to be the time server, in this case i picked a sun server called &#8220;server&#8221;. You<br \/>\nwill trust in this server&#8217;s clock to be correct most of the time.<br \/>\nAt &#8220;server&#8221; do:<br \/>\nroot@server# cd \/etc\/inet<br \/>\nroot@server# vi ntp.conf<br \/>\nAnd paste this inside:<br \/>\nserver 127.127.1.0 prefer<br \/>\nfudge 127.127.1.0 stratum 0<br \/>\nbroadcast 224.0.1.1 ttl 4<br \/>\nenable auth monitor<br \/>\ndriftfile \/var\/ntp\/ntp.drift<br \/>\nstatsdir \/var\/ntp\/ntpstats\/<br \/>\nfilegen peerstats file peerstats type day enable<br \/>\nfilegen loopstats file loopstats type day enable<br \/>\nfilegen clockstats file clockstats type day enable<br \/>\nkeys \/etc\/inet\/ntp.keys<br \/>\ntrustedkey 0<br \/>\nrequestkey 0<br \/>\ncontrolkey 0<br \/>\nThen, start ntp:<br \/>\nroot@server# \/etc\/rc2.d\/S74xntpd start<br \/>\nVerify its status by checking the process and querying the server:<br \/>\nroot@server# ps -ef | grep ntp<br \/>\nroot 8339 6236 0 11:39:16 pts\/6 0:00 grep ntp<br \/>\nroot 6725 1 0 11:15:48 x y z 0:00 \/usr\/lib\/inet\/xntpd<br \/>\nroot@server# ntpq -pn<br \/>\nremote refid st t when poll reach delay offset disp<br \/>\n==============================================================================<br \/>\n*127.127.1.0 .LCL. 0 l 1 64 377 0.00 0.000 10.01<br \/>\n224.0.1.1 0.0.0.0 16 &#8211; &#8211; 64 0 0.00 0.000 16000.0<br \/>\nnow ON THE CLIENT MACHINE:<br \/>\nroot@client# cd \/etc\/inet<br \/>\nroot@client# vi ntp.conf<br \/>\nPaste the contents:<br \/>\ndriftfile \/var\/lib\/ntp\/ntp.drift<br \/>\nserver 150.250.250.18<br \/>\nNotice that 150.250.250.18 is the ip of the timeserver called &#8220;server&#8221;.<br \/>\nNow nitialize the ntp daemon:<br \/>\n295\/433<br \/>\nroot@client# \/etc\/rc2.d\/S74xntpd start<br \/>\nCheck if it&#8217;s running:<br \/>\nroot@client # ps -ef | grep ntp<br \/>\nroot 23579 1 0 11:20:12 x y z 0:00 \/usr\/lib\/inet\/xntpd<br \/>\nroot 1054 18332 0 11:41:34 pts\/8 0:00 grep ntp<br \/>\nroot@client # ntpq -pn<br \/>\nremote refid st t when poll reach delay offset disp<br \/>\n==============================================================================<br \/>\n*150.250.250.18 .LCL. 1 u 4 64 377 18.83 0.473 1.80<br \/>\nThat&#8217;s it!<br \/>\nnow type the &#8220;date&#8221; command, and see the results!<br \/>\n296\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You want to synchronize your solaris servers? don&#8217;t have access to an atomic clock? You must pick one of your solaris servers to be the time server, in this case i picked a sun server called &#8220;server&#8221;. You will trust in this server&#8217;s clock to be correct most of the time. At &#8220;server&#8221; do: root@server# [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-477","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=477"}],"version-history":[{"count":0,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/477\/revisions"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=477"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}