Yes, that's right. I had ntp enabled.<br>With ntp disabled the problem disappear, FS clock is exactly the same as system clock.<br><br>Thanks.<br><br><br><br><div class="gmail_quote">On Fri, Sep 9, 2011 at 5:19 PM, Anthony Minessale <span dir="ltr"><<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Most likely you are using something like ntp to sync your system<br>
clock, if so you should also sync the FS clock when you change the ntp<br>
time.<br>
<br>
FS is keeping it's own time using the monotonic clock in the kernel<br>
which is the same mechanism as the system time so your machine<br>
probably keeps bad time.<br>
<div><div></div><div class="h5"><br>
<br>
On Fri, Sep 9, 2011 at 8:27 AM, Glaucio Vaz de Mello <<a href="mailto:gvmello@yx.cl">gvmello@yx.cl</a>> wrote:<br>
> Hi,<br>
><br>
> Thanks for the answer.<br>
> I made several tests and came to the conclusion that FreeSWITCH clock is<br>
> always avanced compared to system time. The difference is about 9 seconds<br>
> per day, just letting FreeSWITCH running, without touching the system clock.<br>
> Effectively I can sync with system time with "fsctl sync_clock", then the<br>
> difference comes to zero and start counting again.<br>
><br>
> This can be an issue for billing long duration calls, since the registered<br>
> call duration will be some seconds more than it really was.<br>
> If someone need more information, logs or reporting this issue as a bug,<br>
> just let me know.<br>
><br>
><br>
> regards,<br>
> Glaucio<br>
><br>
><br>
><br>
> On Tue, Sep 6, 2011 at 1:57 AM, lakshmanan ganapathy <<a href="mailto:lakindia89@gmail.com">lakindia89@gmail.com</a>><br>
> wrote:<br>
>><br>
>> As for as I know, FreeSWITCH maintains its own clock. When you start<br>
>> freeswitch for the first time, it takes the system time and from there on,<br>
>> it uses its own clock to update the time. So After starting freeswitch, if<br>
>> you change the system time, then freeswitch time and system time will be<br>
>> different.<br>
>><br>
>> You can sync the system time by using "fsctl sync_clock". Check whether<br>
>> the 9 seconds it due to this behaviour....<br>
>><br>
>><br>
>> On Wed, Aug 31, 2011 at 7:26 PM, Glaucio Vaz de Mello <<a href="mailto:gvmello@yx.cl">gvmello@yx.cl</a>><br>
>> wrote:<br>
>>><br>
>>> Hello,<br>
>>><br>
>>> I noticed a difference between FreeSWITCH time and system clock time.<br>
>>> Is this a standard behaviour? or something is wrong in my system?<br>
>>><br>
>>> More details of the issue:<br>
>>> Inside FreeSWITCH I look for current epoch time using this function:<br>
>>> time_t now = switch_epoch_time_now(NULL);<br>
>>><br>
>>> Then I look for system clock current time using:<br>
>>> #include <time.h><br>
>>> time_t now = time(NULL);<br>
>>><br>
>>> Between both results I noticed a difference of 9 seconds.<br>
>>><br>
>>><br>
>>> This can also be viewed using Unix commands.<br>
>>><br>
>>> Unix date command from console:<br>
>>> # date +%s<br>
>>> 1314741992<br>
>>><br>
>>> Then, I start a call and make a DB query:<br>
>>> # sqlite3 /var/freeswitch/db/core.db "SELECT call_created_epoch FROM<br>
>>> calls;"<br>
>>> 1314742000<br>
>>><br>
>>> Then I repeat unix date command:<br>
>>> # date +%s<br>
>>> 1314741994<br>
>>><br>
>>> Any comments are welcome.<br>
>>> Regards,<br>
>>> Glaucio<br>
>>><br>
>>> _______________________________________________<br>
>>> Join us at ClueCon 2011, Aug 9-11, Chicago<br>
>>> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
>>><br>
>>> FreeSWITCH-dev mailing list<br>
>>> <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
>>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
>>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
>>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> Join us at ClueCon 2011, Aug 9-11, Chicago<br>
>> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
>><br>
>> FreeSWITCH-dev mailing list<br>
>> <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> Join us at ClueCon 2011, Aug 9-11, Chicago<br>
> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
><br>
> FreeSWITCH-dev mailing list<br>
> <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
<br>
<br>
<br>
</div></div>--<br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br>
<br>
AIM: anthm<br>
<a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
<br>
FreeSWITCH Developer Conference<br>
<a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:<a href="tel:%2B19193869900" value="+19193869900">+19193869900</a><br>
<div><div></div><div class="h5"><br>
_______________________________________________<br>
Join us at ClueCon 2011, Aug 9-11, Chicago<br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br>