View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 21 posts ] 
Go to page 1, 2  Next

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: How to synchronize time?
PostPosted: Sat May 03, 2008 5:30 am 
Offline
Joined: Sat Mar 18, 2006 6:23 am
Posts: 70
I am running r5f27 and the time on the mythbox is several minutes off. If I reboot, the time is set properly, but a little drift does occur apparently between reboots.

The wiki says that this version of KM automatically keeps the right, but how do I verify that? How do I have the time server program keep things correct? What do I look for? There is a process "ntpd" running after I rebooted.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 03, 2008 6:40 am 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
ntpd is supposed to maintain the correct time, but it seems that if your computer's time is considerably off from the correct time, it won't make that big a correction.

What I usually end up doing is turning off ntpd temporarily, run ntpdate to get it corrected, then turn ntpd back on.


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 03, 2008 6:43 am 
Offline
Joined: Sat Mar 18, 2006 6:23 am
Posts: 70
Thanks for the reply, could you tell me the commands to do that? Then I could put them in crontab and run it daily...


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 03, 2008 7:17 am 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi,

i use as root, ntpdate -u pool.ntp.org at anytime. ntpd does not need to be stopped to run it. I add it to the bottom of /etc/init.d/bootmisc.sh so it starts out corrected a boot time.

There were some video card issues that would cause a time drift that ntpd can't keep up with. I forget the details but maybe a search can dig it up. Had to do with nvidia I think.

Mike


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 03, 2008 7:27 am 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Note that you may not have ntpdate depending on which KnoppMyth you're using. You may have to apt-get it.

Also, once it's synched, you shouldn't have to do this via cron. Once you're close, ntpd should keep things stable. It's only when you're way off does it seem to stop working.


Last edited by ceenvee703 on Sat May 03, 2008 7:50 am, edited 2 times in total.


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 03, 2008 7:29 am 
Offline
Joined: Sat Mar 18, 2006 6:23 am
Posts: 70
Correct, ceenvee, I have no ntpdate, how do I get that as I am not that familiar with apt-get?


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 03, 2008 7:39 am 
Offline
Site Admin
Joined: Fri Sep 19, 2003 6:37 pm
Posts: 2659
Location: Whittier, Ca
Code:
apt-get update
apt-get install ntpdate


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 03, 2008 7:39 am 
Offline
Joined: Fri Jul 29, 2005 1:22 am
Posts: 232
Location: SF East Bay, CA
yes, as the wiki says, ntp is setup on r5f27. (This is not a definitive solution, but I hope that it helps!)

you can status it with
Code:
/etc/init.d/ntp status

your configuration file is /etc/ntp.conf

You could try running ntpdate .. I had to install it.. (run as root)
Code:
apt-get update
apt-get install ntpdate

Then run it with
Code:
ntpdate -u pool.ntp.org

That's configured in /etc/default/ntpdate

The wiki page suggest how you can periodically run it by addition to your crontab .. the example shows daily update.

There is some additional discussion on ntpdate (obsolete program) in
http://knoppmyth.net/phpBB2/viewtopic.php?t=14319&highlight=ntp

and you san search this forum for "ntp".

I like...
Greg Frost wrote:
Commands/services you might be interested in reading about:
date - if you just want to manually set the time
ntpdate - if you want to set it based on an ntp server
ntpd - if you want to keep your system in sync with an ntpserver
ntpq - if you mant to find out whats going on with ntpd

from
http://knoppmyth.net/phpBB2/viewtopic.php?t=8485&highlight=ntp

Primary reference:
http://www.knoppmythwiki.org/index.php?page=TimeSynchronizeHowTo
(maybe we'll get a "Time Lord" to update the wiki page for us! :D Yours is not a unique problem! )

_________________
// Brian - Hardware:
ASUS P5P800 - P4 3Ghz, 500 GB PATA HD
ASUS P5K-V - P4 Core2 Duo, 500 GB SATA HD
Hauppauge PVR-350, IR Blaster, Comcast Digital Cable
http://tech.groups.yahoo.com/group/KnoppMyth/
KnoppMyth R5F27 >> R5.5


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 03, 2008 7:49 am 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Thanks, I totally forgot about the "-u" option for ntpdate which doesn't require the ntp daemon turnoff/turnon. Old habits die hard.

I will try a cleanup on that time synch wiki page sometime soon.


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 03, 2008 9:11 am 
Offline
Joined: Sat Mar 18, 2006 6:23 am
Posts: 70
I have it running in the crontab, and logging the results so I can review them.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 07, 2008 5:54 pm 
Offline
Joined: Fri Nov 18, 2005 9:22 am
Posts: 777
Location: spencerport, ny (USA)
mkaz wrote:
I have it running in the crontab, and logging the results so I can review them.

I've added mine too. I've had problems with drifting outside of the correction window, and then the time drifts by a couple minutes per day. So I added a call to ntpdate -u pool.ntp.org
It's in my crontab, set to run at 16:05. so it should bring things back in line before the nightly news (gets screwed up).


Top
 Profile  
 
 Post subject: ntp working again
PostPosted: Wed Jun 11, 2008 8:44 am 
Offline
Joined: Mon Aug 02, 2004 7:32 pm
Posts: 6
Location: Boulder, CO
I'm running R5F27 and my clock ended up being over 2 minutes fast. I downloaded ntpdate, ran it, and got "no servers found". Turns out I had to reset my Cisco 675 DSL modem. I'm using qwest in Boulder, CO. My access to the web was working the whole time, and I could ping the ntp servers. After the reset, ntpdate worked. Strange, but maybe this info might help someone. I'm at a loss for an explanation, but at least I can get ntp working again.


Top
 Profile  
 
 Post subject: correction window??
PostPosted: Sat Oct 04, 2008 8:16 am 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
ceenvee703 wrote:
ntpd is supposed to maintain the correct time, but it seems that if your computer's time is considerably off from the correct time, it won't make that big a correction.


Why doesn't the NTP client go fetch the correct time (once a day) from a public NTP server (such as time.nist.gov) and simply reset your clock - no matter how off it is? Then there would be no "correction window" weakness built into it.

Curious,
Eric

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 04, 2008 3:18 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi
Quote:
i use as root, ntpdate -u pool.ntp.org at anytime. ntpd does not need to be stopped to run it. I add it to the bottom of /etc/init.d/bootmisc.sh so it starts out corrected a boot time.

There were some video card issues that would cause a time drift that ntpd can't keep up with. I forget the details but maybe a search can dig it up. Had to do with nvidia I think.


Also reread ceenvee703's quote.

You have control over the time servers to request the reference. It is in /etc/ntpd.conf and I set mine to be pool.ntp.org. That keeps it tight enough for this old farmer.

I have found the us.pool.ntp.org & north-america.pool.ntp.org sometimes misfire for me when I am on dialup so now simply use the pool.ntp.org and haven't looked back.

If you never reboot then the drift should automaticlly self adjust clock (slowly) to keep things very close over a period of days even with out a reference.

Your cmos clock is not corrected using ntpdate, so if you reboot guess what, your system starts out with, bad time and the ntpd can't usually fix it right away. I have been meaning to add the hwclock -w to my shutdown script just to fix that issue.

Mike


Top
 Profile  
 
PostPosted: Sun Oct 05, 2008 3:53 pm 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
I see several different ntp programs referenced in this thread. It is not 100% clear which ones do what and which ones are part of a default Knoppmyth installation, and which ones must be loaded manually!

I searched my R5F27 machine with "locate ntp' and found several files with that name in the title, including "/etc/ntp.conf". It looks like ntp IS present in a default install/upgrade.
So, what does this ntp do if it doesn't go out to an ntp server and set the system clock? All it does is tweak the clock by fractions of a second each day??

I searched my R5F27 machine with "locate ntpdate' and did NOT find any hits. It looks like ntpdate must be fetched and loaded manually, so that must not be present in a default install/upgrade.
From reading this thread, I get the impression that ntpdate IS the application we need to actually go out and fetch the time from ntp servers, correct? I always thought this function WAS in a default install/upgrade of Knoppmyth, but I guess is isn't!?

Eric

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ] 
Go to page 1, 2  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu