So what&#39;s the algorithm?  If the time changes by more than half an hour (between the heartbeat sampling the clock) it&#39;s a clock change but if its less than half an hour its clock drift.  What threshold value would you use?  10 minutes? Half an hour?  A minute? I&#39;m interested in opinions here This is easy to add and a good idea, but getting that magic constant right is important.<br>
<br><div class="gmail_quote">On Wed, Jan 12, 2011 at 4:24 AM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Well, putting the CMOS stuff aside,<br>
i really don&#39;t like that VM could hang indefinitely if user will<br>
adjust the clock settings.<br>
<div><div></div><div class="h5"><br>
On 12 January 2011 13:22, Levente Uzonyi &lt;<a href="mailto:leves@elte.hu">leves@elte.hu</a>&gt; wrote:<br>
&gt;<br>
&gt; On Wed, 12 Jan 2011, Frank Shearar wrote:<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Yes, Windows like to set the CMOS clock to local time, and Linux likes to<br>
&gt;&gt; use UTC.<br>
&gt;&gt;<br>
&gt;&gt; My brother recently ran into a similar problem with a FreeBSD machine<br>
&gt;&gt; running as a guest inside a Windows host. He had to touch<br>
&gt;&gt; /etc/wall_cmos_clock to fix it.<br>
&gt;&gt;<br>
&gt;&gt; From the adjkerntz man page:<br>
&gt;&gt;<br>
&gt;&gt; If the file /etc/wall_cmos_clock exists, it means that CMOS clock keeps<br>
&gt;&gt; local time (MS-DOS and MS-Windows compatible mode).  If that file does not<br>
&gt;&gt; exist, it means that the CMOS clock keeps UTC time.<br>
&gt;&gt;<br>
&gt;&gt; Maybe there&#39;s a similar Linux/Mac fix?<br>
&gt;<br>
&gt; Yes, there is, but different linux distributions have different files IIRC.<br>
&gt; Btw, if you tell linux to assume that the hardware clock stores the local<br>
&gt; time, you&#39;ll still have problems after daylight saving related time changes,<br>
&gt; because both OSs will adjust the clock.<br>
&gt;<br>
&gt;<br>
&gt; Levente<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; frank<br>
&gt;&gt;<br>
&gt;&gt; On 2011/01/12 01:18, Chris Muller wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Every time I jump back and forth from Windows to Linux on my primary<br>
&gt;&gt;&gt; laptop, the clock is wrong...<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Tue, Jan 11, 2011 at 4:37 PM, Igor Stasenko&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;<br>
&gt;&gt;&gt;  wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Yesterday on my comp two separate running images are hung<br>
&gt;&gt;&gt;&gt; simultaneously, while i were doing something completely outside of<br>
&gt;&gt;&gt;&gt; them.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; And now during reading  the sqUnixHeartBeat.c:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;        /* The native clock may go backwards, e.g. due to NTP<br>
&gt;&gt;&gt;&gt; adjustments, although<br>
&gt;&gt;&gt;&gt;         * why it can&#39;t avoid small backward steps itself, I don&#39;t know.<br>
&gt;&gt;&gt;&gt; Simply<br>
&gt;&gt;&gt;&gt;         * ignore backward steps and wait until the clock catches up<br>
&gt;&gt;&gt;&gt; again.  Of<br>
&gt;&gt;&gt;&gt;         * course this will cause problems if the clock is manually<br>
&gt;&gt;&gt;&gt; adjusted.  To<br>
&gt;&gt;&gt;&gt;         * which the doctor says, &quot;don&#39;t do that&quot;.<br>
&gt;&gt;&gt;&gt;         */<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; i start recalling that yesterday i adjusted clock back by 1 hour,<br>
&gt;&gt;&gt;&gt; because after installing a windoze in dual boot it was set it wrongly.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; But of course it could be anything else :)<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt; Best regards,<br>
&gt;&gt;&gt;&gt; Igor Stasenko AKA sig.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Best regards,<br>
Igor Stasenko AKA sig.<br>
</div></div></blockquote></div><br>