View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 8 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Feb 16, 2007 7:57 am 
Offline
Joined: Wed Mar 22, 2006 8:17 pm
Posts: 32
I've just realized that my MythTV clock seems to be slow - less than a minute, seems somewhere around 20-40 seconds or so. But enough that it misses the intro/beginnings of most shows that it's set to record. I'm not sure how long it's been going on, but the last few weeks it's been botching my Thursday night shows.

I'm running R5B7 on an Nforce4 board. When I ran "ntpdate" I got this:
Quote:
root@mythtv:~# ntpdate ntp0.cornell.edu
16 Feb 06:40:43 ntpdate[11632]: the NTP socket is in use, exiting
root@mythtv:~#


I also did this according to the wiki:
Quote:
1) su to root
2) nano /etc/lilo.conf
3) Find the "append" line
4) make the line as follows
append="apm=power-off nomce noapic noioapic"
5) Save changes
6) Run lilo
7) Reboot.


But it was still off. So pardon me being completely new to this, as I'm still learning my way around linux, but where do I go from here?

Is there a way to force a resync, or to tell how much the clock is off or something? I'm not that familiar with the clock commands in linux.

Is there another solution or something I should do? I'd change my programs to start a minute earlier, but I've got a PVR500 (2 tuners) and overlaps cause problems and make it not record programs because when one is a minute earlier another show is still recording.

Thanks for any help or advice!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 16, 2007 8:10 am 
Offline
Joined: Tue Aug 08, 2006 7:08 pm
Posts: 561
Location: UK
It can be difficult to tell if it's a problem with the clock, or a station being consistently off.
If you have access to teletext you should be able to compare it with the date command. If not, do you have anything like the speaking clock in your area just to check?

Bruce S.

_________________
Updated 2019/10/26: AthlonII X2 265 Gigabyte GA-970A-DS3P
16Gb PC 1866 DDR3, 500GB+2TB+4TB SATA HDD,
SATA DVD-RW Asus DRW-24D5MT , NVIDIA GeForce GT1080
Hauppauage Nova-T 500, Nova-T LinHes R8.6.1


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 16, 2007 8:14 am 
Offline
Joined: Wed Mar 22, 2006 8:17 pm
Posts: 32
Thanks, I'll check on that. Granted, that's part of the problem - I'm not sure if the local cable is off or what. But the cable box will switch to 8:30pm, and the show will start. If I pull up MythWeb at that moment, it still says 8:29 and is not recording. If I refresh a few times (within a short while), then the Myth box changes to 8:30 and begins recording. It's *close*, but it's missing some things.....sigh.....


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 16, 2007 8:30 am 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
I had problems with ntpd on a couple of Slackware boxes, so I opted to use ntpdate each hour instead. You would need to do something along the lines of:
Code:
/etc/init.d/ntp-server stop
update-rc.d -f ntp-server remove

Then add the following lines to /etc/cron.hourly/settime:
Code:
#!/bin/sh
/usr/sbin/ntpdate -v -b time-a.nist.gov

Then make /etc/cron.hourly/settime executable:
Code:
chmod 755 /etc/cron.hourly/settime


See if that helps your situation. If not, you can simply remove /etc/cron.hourly/settime and run
Code:
update-rc.d ntp-server defaults
to get back to where you were.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 16, 2007 11:33 am 
Offline
Joined: Wed Feb 08, 2006 6:13 pm
Posts: 480
Location: IN
Be careful with using ntp-date with a cron job. While it does work, if your clock has a fair amount of drift the sudden changing of the time can give some programs headaches. For example if your clock gains 8 seconds per hour. When that cron job runs it will jerk the clock back by 8 seconds. This "going back in time" could confuse some programs.

The ntp-server handles this much more graciously by slightly increasing or decreasing the clock to "catch-up" or "fall-back" to actual time gradually to avoid sudden leaps.

I would recommend only using the ntp-date / cron job solution as a last resort.

If you are experiencing substantial clock drift you may need to look at your BIOS settings for "spread spectrum" as this is known to cause clock drift issues in some cases. I had an nForce2 motherboard that suffered from this. A search for "clock drift spread spectrum" should get you started.

Good Luck,

Martian

_________________
ABIT NF-M2 nView | Athlon 64 X2 3800+ | 2GB DDR2 800 | HDHomerun | GeForce 6150 (onboard) | WD 640 GB SATA HD | DVD-RW (sata) | StreamZap IR receiver with Logitech Harmony remote

Vizio 37" LCD HDTV (1080p)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 16, 2007 12:14 pm 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
Martian wrote:
If you are experiencing substantial clock drift you may need to look at your BIOS settings for "spread spectrum" as this is known to cause clock drift issues in some cases. I had an nForce2 motherboard that suffered from this. A search for "clock drift spread spectrum" should get you started.
Very helpful Martian, thanks! I'll check into the BIOS settings on those systems that were causing headaches with ntpd.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 16, 2007 2:10 pm 
Offline
Joined: Sun Nov 20, 2005 10:07 pm
Posts: 116
If you want, you can also set up ntpd to run all the time.

I like that the best then the computer can be a time server in the house as well (if you have more than one PC running)...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 16, 2007 9:53 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi,

In most of the installs / upgrades cesman has the ntpd start at the normal start up and if the clock is close should tweak it over a period time (hours ~ days?) to be really tight.

I put a one liner in my boot to do a one time tweak on boot / reboot before things get running and have had no issues. Using the original example:
# ntpdate ntp0.cornell.edu won't work, # ntpdate -u ntp0.cornell.edu should work.

# echo "ntpdate -u ntp0.cornell.edu" >> /etc/init.d/bootmisc.sh will add the inital clock set at boot so ntpd should be able to tweak the fine corrections gracefuly.

Mike


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 21 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