PDA

View Full Version : Tivo Time Problem



sadrake
28-07-2005, 06:15 PM
I keep having to run Touch /var/hack/timestamp and then force_index.tcl to get my tivo to work with season passes and tivo suggestions.

This is due to the log error that keeps coming back:
Jul 28 20:58:12 (none) DbGc[165]: DbGc::HandleTriggerWhileIdle -- clock is warped -- re-marking in 300 seconds

Will running this command help and can i run it as a cron job if I put it in a script, which would bring me to the next question what type of script as im not a unix guru.

TiVo [p0] /hack/etc]# TZ=Pacific/Auckland rdate -vs 207.126.98.204
Offset 43200 for timezone NZST, daylight saving is off
Setting local time to Thu Jul 28 21:11:44 2005
[TiVo [p0] /hack/etc]#

thomson
28-07-2005, 07:22 PM
You could create a bourne shell script called "Set_NZ_Time.sh" that contains the following:

#!/bin/sh

# Stop time warp messages
touch /var/timestamp

# Set the time to time server with appropriate timezone offset
TZ=Pacific/Auckland /hack/bin/rdate -vs 207.126.98.204

Once you have created the file, you will need to make it executable using the chmod command:

# chmod 755 Set_NZ_Time.sh

The it is just a matter of adding a line to your /hack/etc/crontab file:

# Synchronise the time on Monday mornings
17 01 * * 1 /hack/bin/Set_NZ_Time.sh > /dev/null 2>&1 &

maddog
28-07-2005, 08:09 PM
I guess its possible that the clock skew could be due to the small battery on the motherboard running low and needing replacement. Im pretty sure I spotted one last time I opened my tivo - not sure if there are any gotchas to worry about in replacing it on a tivo as opposed to on a normal pc but I imagine it is straight forward.

petestrash
28-07-2005, 11:37 PM
Which version of the image are you using?

If it a r1.4 version made before april 19 then there is a known bug.

From:KnownIssuesCurrentImageRelease (http://minnie.tuhs.org/twiki/bin/view/Install/KnownIssuesCurrentImageRelease)



The clock is warped after GS and will not index properly.
This issue has been fixed -- PetesTrash - 19 Apr 2005
wrong ntpdate binary snuck on there >:( Ed

This may correct itself when it does its next daily call (I have been too impatient to wait that long).

You can correct this manually by telneting into your TiVo? and running the following commands:
[TiVo [p0] ~]# touch /var/timestamp
[TiVo [p0] ~]# /hack/bin/force_index.tcl

To correct this in older versions download ntpdate (http://minnie.tuhs.org/twiki/pub/Uploads/WebHome/ntpdate) and replace the existing file in /bin

The battery is unused while power is applied to the unit and replacing the battery is almost unheard of (and a pain to do).

Peter

sadrake
29-07-2005, 05:12 AM
-rwxr-xr-x 1 0 0 59473 Mar 30 03:09 ntpdate
-rwxr-xr-x 1 0 0 299512 May 24 03:37 ntpdate.orig

I setup my Tivo in June and looking at the bin directory on my Tivo it looks like it has the right one, I comparied the file size to the one in the link and it looks about right. (considering ntpdate.orig is massive in comparison)

Im going to put the script inplace as it will save me having to do it manually when it happens. Thanks Thomson.

petestrash
29-07-2005, 12:35 PM
That is odd behavior since you are using the correct ntpdate.

Thompsons' workaround should work for you, but I would recommend running it more than once a week as some TiVo's do tend to drift.

I would like to find the real reason though, as most people no longer have this issue since the replacement ntpdate was used.

Before using thompsons scripts could you post your otclient log after a daily call and also advise what datestamp is on /var/timestamp before and after the call.

Peter.

sadrake
06-08-2005, 08:14 PM
That is odd behavior since you are using the correct ntpdate.

Before using thompsons scripts could you post your otclient log after a daily call and also advise what datestamp is on /var/timestamp before and after the call.

Peter.

I have had a look for /var/timestamp and it is missing, this is after a reboot as Ive been under the house running Cat5 and relocating the Sky arial to the wall cavity with a proper socket.

After running touch /var/timestamp a file of zero length appears, can I put some junk in the file like space or something to make it non zero in size, and will that stop it from dissappearing

-rw-r--r-- 1 0 0 0 Aug 6 23:10 timestamp

I have attached the otclient log but cannot give you the before time as the timestamp file did not exist.

Cheers
S. :confused:

petestrash
07-08-2005, 11:46 PM
I have had a look for /var/timestamp and it is missing...After running touch /var/timestamp a file of zero length appears, can I put some junk in the file like space or something to make it non zero in size, and will that stop it from dissappearing

Touching a file will just update the time it was last modified to the current time. If the named file does not exist, it will create a zero length file. In our case the file named 'timestamp' will always be zero length, as only the date is used for index checking.


Aug 6 15:47:10 (none) comm[155]: Setting clock. Command = "/bin/ntpdate -b 127.0.0.1"
Aug 6 15:47:10 (none) comm[155]: About to execute: /bin/ntpdate -b 127.0.0.1 2>&1
Aug 6 15:47:12 (none) comm[155]: Command: /bin/ntpdate -b 127.0.0.1 2>&1, failed: 256

For some reason your ntpdate is trying to get the date from your machine (127.0.0.1). I assume you are not running a timeserver.

The correct command on the r1.4 image should be something like '/bin/ntpdate -b 192.43.244.18 129.6.15.29 132.163.4.103'.

Have you modified some files ?

Peter.

sadrake
08-08-2005, 05:31 AM
Quite possibly when I was setting it up.

What is the syntax for the grep command for searching for "/bin/ntpdate -b 127.0.0.1 2>&1"

or what files are the likely candidates for this command?

I have a look tonight when I get home.

Wibble
08-08-2005, 01:02 PM
Check my quick summary at http://forums.oztivo.net/showthread.php?t=631&highlight=ntpdate

To do a global grep use (assuming the tivo grep knows about -r)
grep -rl ntpdate /*

otherwise
find / -exec grep -l ntpdate {} \;

petestrash
08-08-2005, 01:50 PM
Check my quick summary at http://forums.oztivo.net/showthread.php?t=631&highlight=ntpdate

ntpdate included on r1.4 is a very different beast to r1.3 on last years image. the whole issue is handled differently to avoid the clock warp issues some people were having with r1.3.

Unfortunately the code examples you gave to find ntpdate will die on /dev/console. TiVo does not support -prune or -e (exclude) directories from find/grep, so I can't think of another global search that won't fork ATM.

Peter

sadrake
09-08-2005, 07:57 AM
I tried the search first and they did die, I did search manually through any folders i could find that had config files or similar in them and could not find any reference to ntpdate using the loopback address for time.

Any ideas on where the otclient process is picking this up from would be appreciated.

petestrash
09-08-2005, 01:04 PM
It's definately not set up by the installer on the current image like that, so which guide did you follow to set your TiVo up. This may give us some clues as to where you went wrong.

Alternativley it may just be easier to start from scratch again.

Peter.

sadrake
10-08-2005, 08:25 AM
I used the guide on nztivo.net to setup my Tivo

http://www.nztivo.net/index.php/ImageWithScreenShots1.4

I had trouble with the time from the beginning and found the the postcodezones file on nztivo.net was missing.

I think i may have a bad postcodezones file installed and will check tonight for the dreaded ^M

http://oztivo.net/forums/archive/index.php/t-267.html

petestrash
10-08-2005, 01:02 PM
http://oztivo.net/forums/archive/index.php/t-267.html

Reading through this archived thread, Ed points out the NZ emulator directs the ntpdate back onto the TiVo. This was fine for r1.3, but ntpdate does a lot more in r1.4

So unless anyone in NZ has a better method of syncing r1.4 I suggest adding a cron job to run /bin/ntpdate -b 192.43.244.18 129.6.15.29 132.163.4.103 at least a couple of times a week. This will touch timestamp and sync your clock.

You might want to try it from the command line first an make sure it sets the right time for NZ.

Peter.

sadrake
10-08-2005, 04:28 PM
One last question is my Cron Job correct for running my set_NZ_time.sh script at 4am every day. Im not use to cron (Windoz mainly)

If it is then im putting this one to bed.

0 04 * * * /hack/bin/set_NZ_time.sh > /dev/null 2>&1 &

Thanks for all the help BTW.

petestrash
10-08-2005, 05:47 PM
0 04 * * * /hack/bin/set_NZ_time.sh > /dev/null 2>&1 &

Yes that looks fine, assuming you made the file 'set_NZ_time.sh' following thomsons instructions and you uploaded 'rdate' to /hack/bin as it is not included in the r1.4 image.

Peter.