Re: [chrony-users] Control when the driftfile is written

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On Thu, 20 Feb 2014, aobrien@xxxxxxxxxxxxxxx wrote:

Quoting Bill Unruh <unruh@xxxxxxxxxxxxxx>:

On Thu, 20 Feb 2014, Andrew O'Brien wrote:

> Hello list,
> > I'm interested in running chrony on an embedded device where the > filesystem is normally mounted read only.  My plan was to have a cron > job remount rw and ask chrony to write the driftfile but I can't seem to > figure out that last part.

Well, you could have a small filesystem mounted in ram as a tmpfs, and then
have a cron job remount the disk/flash based filesystem rw and copy the drift
file over from the tmpfs filesystem.

> --
William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/

That's a good idea but what I was worried about was that chrony would only write the file when it was shutting down. As the device is normally just powered off (hence the ro filesystem) it would never get written.

Does anyone know if it writes the file more often than that?

Once an hour

From reference.c

 if (drift_file) {
    /* Update drift file at most once per hour */
    drift_file_age += update_interval;
    if (drift_file_age < 0.0 || drift_file_age > 3600.0) {
      update_drift_file(abs_freq_ppm, our_skew);
      drift_file_age = 0.0;
    }


So if you had a cron job to write it to permanant from temporary say once and
hour, or even once a day, it would not be too old and should be a reasonable
estimate of the drift.


--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


--
William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/