[ Main Page ]

NTP tips

時間合わせで有名ものは 桜時計ですが、もちろん UNIXの世界でもNTPは使えます。Vine Linuxにはxntpが入っているようです。
まずは、uid=0の状態で

ntpdate ntp.nc.u-tokyo.ac.jp

とすると、大きくずれた時間があわされます。あとは/etc/ntp.conf を編集してntpd(或いはxntpd)を走らせます。

# 試行サービス
server 210.173.160.27 # ntp1.jst.mfeed.ad.jp
server 210.173.160.57 # ntp2.jst.mfeed.ad.jp
server 210.173.160.87 # ntp3.jst.mfeed.ad.jp
# ECCで使われているようだ。
server 130.69.251.23 # ntp.nc.u-tokyo.ac.jp
server 133.31.30.8 # sutns.sut.ac.jp
server 133.40.41.175 # gpsntp.miz.nao.ac.jp
# digすればわかるが、ここのを使う時はちょっと注意すべき点がある
# 以下は複数並べるべきだが、restrictが...
# server ntp.ring.gr.jp

restrict 210.173.160.27
restrict 210.173.160.57
restrict 210.173.160.87
restrict 130.69.251.23
restrict 133.31.30.8
restrict 133.40.41.175
#restrict ntp.ring.gr.jp

# NAT内のクライアント
restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap
restrict 127.0.0.1
fudge 127.127.1.0 stratum 5
server 127.127.1.0
driftfile /etc/ntp.drift
logfile /var/log/ntp.log
    

福岡大学のNTPServerを使うのはもうやめましょう。 Trafficの増大がすごいそうです。最近は、ntp.ring.gr.jp でもサービスしているので、これを使うのもよいでしょう。 上の例では複数を示しましたが、実際は一つで十分のことが多いです。 また、クライアントそれぞれで上位のServerを指すようなことは止めましょう。

        <dkr>  which is that ACME:: filter that obfusctaes all your source
               into whitespace? :)
  <preaction>  Acme::Bleach
    <rindolf>  dkr: as preaction said it is Acme::Bleach.
        <dkr>  moderation -1 Redundant
            *  dkr smirks
        <nws>  get out you slashdotter
        <nws>  jk
        <dkr>  I got moderated overrated yesterday. I felt so loved
        <dkr>  GumbyGumby: how often do you post to /.?
 <GumbyGumby>  dkr: do it to system() a ssh command. Is doing that often.
    <rindolf>  GumbyBRAIN: how often do you post dkr to Slashdot?
 <GumbyBRAIN>  do it to list.

    -- Got the Slashdot?
    -- #perl, Freenode

One of the most dangerous illusions you get from school is the idea that doing
great things requires a lot of discipline. Most subjects are taught in such a
boring way that it's only by discipline that you can flog yourself through
them. So I was surprised when, early in college, I read a quote by
Wittgenstein saying that he had no self-discipline and had never been able to
deny himself anything, not even a cup of coffee.

Now I know a number of people who do great work, and it's the same with all of
them. They have little discipline. They're all terrible procrastinators and
find it almost impossible to make themselves do anything they're not
interested in. One still hasn't sent out his half of the thank-you notes from
his wedding, four years ago. Another has 26,000 emails in her inbox.

I'm not saying you can get away with zero self-discipline. You probably need
about the amount you need to go running. I'm often reluctant to go running,
but once I do, I enjoy it. And if I don't run for several days, I feel ill.
It's the same with people who do great things. They know they'll feel bad if
they don't work, and they have enough discipline to get themselves to their
desks to start working. But once they get started, interest takes over, and
discipline is no longer necessary.

    -- Paul Graham
    -- What You'll Wish You'd Known ( http://www.paulgraham.com/hs.html )


Powered by UNIX fortune(6)
[ Main Page ]