Help - Search - Members - Calendar
Full Version: Gentoo And Network Time?
Linuxhelp > Support > Technical Support
Jim
Is there a way for Gentoo to set the time from a public time server?
hughesjr
yes smile.gif
hughesjr
emerge -UuDp ntp

edit the file:

/etc/ntp.conf

add a couple servers ... I use:

server tock.usno.navy.mil
server tick.usno.navy.mil


start it with:

/etc/init.d/ntpd start

after about 30 minutes, run the command:

ntpq

You will be in a prompt ... run the command:

peers

If you see the servers ... you should be good.

use the quit command to exit

then do:

rc-update add ntpd default

so it will start later when you reboot...
Jim
I thought you were going to be all jerk on me there and not finish. Thanks.
Jim
Ok, so my clock is still running about 20 mins ahead, I asume my bios clock is wrong, but thats not the point. The point is that the network time servers should have taken over my clock. How do I tell if the ntp is running and if its working?
hughesjr
Use the program ntpq

at the prompt ... type the command peers

Here is the output of my command:

QUOTE
ntpq> peers
    remote          refid      st t when poll reach  delay  offset  jitter
==============================================================================
+navobs1.wustl.e .PSC.          1 u  396 1024  377  66.465  -5.376  0.815
*tick.uh.edu    .USNO.          1 u  300 1024  377  45.729  2.545    1.651


So ... I am -5ms (millisecs) from one and +2.5ms from the other server.
Jim
Ok, I guess some how the servers didn't get saved when I edited my conf file. Ups, o well, I think its all working now.
hughesjr
cool, glad it is working

(that never happens in vi smile.gif )
Jim
I love opening up old topics.

So I never got this working before, and now I revisited it, and I got it working fine, except its five hours off because its givining me zulu time. How do I adjust the time zone difference? I tried ln -sf /usr/share/zoneinfo/CST6CDT but that didn't seem to do it. Ok, just add this to the list of little things I need tweeked.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.