TiVoCommunity.com
(c)opyright 1995-2005 All rights reserved
indexcheckTC
This area is a static history of posts in the TiVo Community Forum Archive.
This archive history was made for the simple indexing of search sites like Google.



Pages:1



NTP client for TIVO

(Click here to view the original thread with full colors/images)



Posted by: 105547111

Question for all you tivo people out there. Is there a NTP client for a tivo that anyone has compiled and it works?

By a client I mean like the standard unix one, that runs constantly and simply listens for NTP broadcasts on the network and then sets the clock.

Obviously you need a NTP server on your LAN, but that is easy.

It uses less resources and does not require cron, as you start it at bootup and remains on all the time.

Thanks!



Posted by: cojonesdetoro

I remember reading of something called 'dumntpd' but I think it was just a looped script running ntpdate. The fact is, I use ntpdate and it seems to work fine. You can run it from cron or from a Tivoweb module with an event loop. FWIW, cron takes very little resources on my SA1.

500K according to top:

187 root 3 0 492 480 388 S 0 0.0 1.5 0:00 cron

I think it's worth it when you consider how useful it is.



Posted by: 105547111

Thanks for the info. So basically ntpdate does not use much resources?

The reason I ask is my TIVO clock is something cronically sick. Basically I had cron setting the clock every 24 hours and it was up to 12 minutes out!!. In Australia we use a special rtimetz. It sets the clock by connecting to a NTP server, then checks the zoneinfo zone that has been added, checks for DST and sets the time.

However I have a NTP server on my domain controller that broadcasts NTP packets. All my PCs have NTP clients that set the clock and adjust drift on receiving these packets. I know linux has the same, but as usual another missing thing on TIVO :(

So I thought someone may have cross compiled one.

ATM I have got cron setting the clock every 15 minutes. I still see about 2 to 3 seconds wrong before the next set. My domain NTP server does not care, it won't get overloaded, its a class 1 NTP server. However it must use a lot of resources on TIVO compared to a tiny simple NTP client listening for packets.



Posted by: cojonesdetoro

I bet you could runt ntpdate with great frequency without seeing problems. It runs very fast and seems to take few resources. I was able to catch it in the process table (not easy 'cause it runs quick) and it shows up using very little memory and no CPU. I would say that you could try running it every minute or so and would probably not run into trouble,

code:
USER PID %CPU %MEM SIZE RSS TTY STAT START TIME COMMAND root 24844 0.0 0.6 316 92 p0 R < 17:55 0:00 ntpdate 192.168.33.1


EDIT: BTW, this was an SA1/3.0 so YMMV

EDIT2: This was tested with a local NTP server as well. There may different behavior for Internet NTP. There are also implications if the NTP server is unreachable.



Posted by: 105547111

Wonderful and thanks for the effort in catching it updating!

As it turns out, I managed to find c code for a NTP client, that uses virtually no resources. Its a client that listens for NTP packets.

With a lot of help from a member of oztivo, managed to modify it to use zoneinfo and then compile and get it working!

Thanks again!



Posted by: cojonesdetoro

quote:
Originally posted by 105547111
As it turns out, I managed to find c code for a NTP client,


Share the wealth ;^>



Posted by: 105547111

http://www.kaska.demon.co.uk/

Its called K9

The c code is there :)





vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Limited.
vB Easy Archive Final ©2000 - 2009 - Created by Stefan "Xenon" Kaeser Modified by Adam J. de Jaray