[asterisk-users] hardware clock drift and CDR

Gordon Henderson gordon+asterisk at drogon.net
Sun Apr 25 13:35:26 CDT 2010


On Sun, 25 Apr 2010, Vieri wrote:

> Hi,
>
> I've noticed that one of my new servers (new mobo) if drifting slowly 
> backwards in time (in aprox. 24 hours, system time drifts back 5 
> minutes).
>
> I have an ntpd process which is supposed to sync with a lan time server 
> but it's not quite working. So I'm launching a manual ntpdate or 
> ntp-client once an hour and that seems to work.

If you can run ntpdate and it sets the time, then you are not running 
ntpd. The 2 can not run at the same time.

So I'd start by fixing ntpd. It really is the best way forward.

> However, suppose I update system time at every hour and it sets +1 
> minute (due to a -1 minute drift). Suppose a call is dialed at 03:58 and 
> lasts 4 "real" minutes. According to the updated system time, the call 
> will have lasted 5 minutes (4+1 drift).
>
> How does Asterisk CDR count the duration/billsec values? Does it rely on 
> system time ONLY for "call start" or also for "call end"?
>
> What Asterisk-related side-effects should I expect from a drifting 
> clock?

Who cares. Just fix ntpd then your worys are gone.

Gordon



More information about the asterisk-users mailing list