Topic: How does chumby sync time?

I'm running a chumby with a USB drive in the back to make it run a single dedicated application I wrote myself. My debugchumby script starts by running /usr/chumby/scripts/sync_time.sh, and then invokes my application via chumbyflashplayer.x.

I wasn't quite sure if running that script synchronised the time once or started a daemon that would keep it permanently in sync, so I've been tcpdumping all the chumby's network traffic for a few days to see if I can prove whether it's doing any network time synchronisation at all. I haven't found any yet, even at bootup - yet the chumby reliably gets the right time when it starts up. Do I need to do something more in the debugchumby script?

Also, I recently experienced a glitch in the application which would be most easily explained by the chumby's clock having jumped backward by a second. So I wondered if the chumby might be using a time sync protocol which didn't take care to keep the clock monotonic. Some forum posts here support this, saying that chumby uses rdate rather than NTP - but my tcpdump doesn't show any instances of rdate either, so I'm confused.

How does chumby's time sync software work in general? Will it run continuously after I invoke sync_time.sh? Should I have done something specific to make it run continuously? Is there an internal backup clock of any kind? Is it expected behaviour that occasionally a Flash application can experience a small backward clock jump? (I can work around it if the answer is yes, but I want to be convinced that that's really what's happening before I do that.)

Re: How does chumby sync time?

There's a cron job that calls rdate every 3 hours.

Re: How does chumby sync time?

Right. So in principle, there is the possibility of a backward time jump; fair enough, I can work round that.

I'm still not sure why I wasn't seeing the rdate packets in my tcpdump, but I assume that's not your fault and I need to debug my tcpdump...

Re: How does chumby sync time?

D'oh, I've worked out what the problem was with my tcpdump. OK, problem now entirely solved, cheers :-)

Incidentally, that cron job? Looks like "at 3am" to me, not "every 3 hours": /etc/cron/crontabs/root says "0 3 * * *".

Re: How does chumby sync time?

Ah yes, you're right.  Sorry about that.

Re: How does chumby sync time?

Can this be changed? How would one change this from every 3 AM to every 3 hours (or maybe even every hour)?

I could use this as a temporary workaround for my Chumby's time-drifting problem until a software update fixes it for good.

Re: How does chumby sync time?

You'd change the entry in the cron tab to "0 */3 * * *"  for updates every 3 hours, or "0 * * * *" for every hour.

Re: How does chumby sync time?

Awesome, thanks, I'll do that when I get home. This'll lessen the impact of the time-drifting (hopefully) until it's fixed.

Re: How does chumby sync time?

By the way, the proper way to edit crontabs is with the command "crontab -e".

Re: How does chumby sync time?

Thanks, just updated the cron file and rebooted. A resynch every hour should keep me within +/- 1 min of actual time.

Got an email from Sam and it sounds like we'll be trading units. Something about Duane... scalpels... and dissection...

11 (edited by joltdude 2008-04-30 18:50:37)

Re: How does chumby sync time?

Either that or Bunnie with a set of probes and a desoldering iron.. (if youve read Bunnie's log, he has a fascination with having chips de-cap'ed)

Having a mental image of Limor Friedman and Bunnie in an operating room with scalpels and soldiering irons in hand.... *ITS ALIVE***