Re: [chrony-users] Modifying system date and syncing back

[ Thread Index | Date Index | More Archives ]

That was one of the options that i did consider,  
but i wanted to know if i could achieve the same with chrony running . I have implemented  the Suggestions given by Miroslav Lichvar in my test scripts and monitoring .

On Mon, May 12, 2014 at 2:45 PM, Ed W <lists@xxxxxxxxxxxxxx> wrote:
On 28/04/2014 13:06, Miroslav Lichvar wrote:
On Sat, Apr 26, 2014 at 10:53:17PM +0530, mallapadi niranjan wrote:
we have certain automation testing where we expire certs by moving
date,     We currently do move the date back  by date command ,


chronyc -a offline
date -s '1 month'
<perform certain actions>
date -s '1 month ago'
chronyc - a online
chronyc -a makestep

what i would like to  know is   can we modify the date after making the
time source offline  ?
I wouldn't recommend doing that. Even if you set the time back to
where it would be it wasn't stepped, and no measurements were made in
that period, it could still trigger some code in chronyd which tries
to detect backward clock jumps and invalidate old samples, or upset
it enough that it would take longer time to recover.

A better approach would be to make chronyd step the clock via the
manual feature. For example:

chronyc -a 'manual on' (or enable it in chrony.conf)

chronyc -a -m 'offline' 'settime 1 month' 'makestep' 'manual reset'

chronyc -a -m 'settime 1 month ago' 'makestep' 'manual reset' 'online'

What about simply killing Chrony, allowing it to write its various dump files to disk

Then mess with the clock as you see fit

Then restart chrony using the option to reload time from the RTC - this should be identical to the situation when booting so everything should just come up normally?

Ed W

To unsubscribe email with "unsubscribe" in the subject.
For help email with "help" in the subject.
Trouble?  Email

Mail converted by MHonArc 2.6.19+