Re: AW: [chrony-users] chrony: Use of RTC trimming together with ntpdate: A Bad Thing ?

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


On Wed, 31 Aug 2011, thomas.schmid@xxxxxxxxx wrote:

Hi Bill,

OK, more explanation is needed:
1) The system *may* have its BIOS battery removed, been put to storage, taken out of storage, has gotten a new
battery and is now starting up with the BIOS (and then system time) off by hours. For this I want to run ntpdate, which
would bring the system time very close to the real time.
You could run chrony with initstepslew some small number and with the remote
server you want to get the time from initstepslew 30 142.103.1.1
says, go to 142.103.1.1 and ask for the time. If the system time is more than
30 sec off, jump the clock to the right time. If less, slew the clock to the
right time. If you wanted you could make that 1 second instead (or maybe even
0, but I am not sure that will work.)

But you can then use chronyc to tell the system to set the rtc to the right
time.



2) The system now runs for a while, the external network is disconnected, and the system rebooted. At reboot, chrony

rebooted? Why rebooted? Just bring down the old network and bring up the new.



shall use the RTC to set up the system time, as ntpdate will have failed due to the missing network connections.

ntpdate is a one shot thing. It will connect that once, and then stop.


So I want to have it both ways, but would a possible way be:
run ntpdate
if ntpdate == OK
  run chronyd (without '-s')
else
  run chronyd -s
fi

Just run chronyd to do everything you want?



Hi,

Due to the nature of my systems, I need to use a separate system-time-setting tool besides a time keeping
daemon, because my boot up looks like this:
1. Add temporary route
Why not run chrony instead with a small initstep.
Hm, I thought of that, but how would I know *when* chronyd has finished its "initslewstep" so I can remove the
route again ? From tests using chronyd -d it looks like it takes almost 5s from chronyd's start until "initslewstep"
has run ?

2. run ntpdate to defined server
3. Remove temporary route
4. Start chronyd (with RTC trimming + restoring)
??? You say you have already set up the system time using ntpdate. Why would
you want to then use the rtc?
See above explanation. It's an either-or need.

5. Start real routing services

The helper route for the initial time update (which can be very large) needs to go away before the "real" routing
services start, because this would interfere with the whole systems operation.
Fine, so pull it down. The only thing you would need is to tell chrony (using
chronyc) to put the remote servers online.
But I am confused. You have an rtc. Why not use it to define the intial system
time rather than using ntpdate? That is what it is for.
Because I have no control about when the RTC contains valid data or not (Battery remove/change).

OK, then do not use the rtc at all.



So, please: can ntpdate be used in conjunction with chrony and RTC trimming ? Special configuration needed ?
ntpdate is a program to set your system clock in a one shot basis from a
remote server. rtc is a way to set your system clock with the onboard clock.
Why would you want to set your system clock from both?

Note: Sorry if this is daft question but I need to be sure on this, so ask the experts :-)
Asking is fine. I am just confused as to what the question is.
I hope my explanation at the beginning makes the situation a bit clearer ?


Thanks,
Thomas Schmid

---
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/

---
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.


---
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/

---
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.


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