My second post on this forum. Hello everyone.
A while back I had my RT-AC56U running for over two months without reboot. I was surprised by how much the clock has drifted during the period. It's more than a minute. Lately i got sometime to look into the cause and found the issue puzzling.
By design asuswrt has a NTP daemon that will sync up my router's clock against a time server on reboot. After that, the daemon will re-sync the clock every 12 hours. If things work properly, the router's clock should show little drift from the time server at anytime.
I can check for clock drift by issuing
Output will include something like this:
It shows my router's clock has drifted by 430724.57 micro-seconds. That's a drift of ~0.43s since my manual sync about 10 hours ago.
Upon further experiments, I'm quite sure that asuswrt NTP daemon's per-12-hour sync does not happen. I can see the problem in merlin 43_2 and merlin 44. It could exist in less recent merlin versions (which were further complicated by other NTP related issue) as well as asus stock versions.
By looking at the NTP daemon code here, with my experiments at the moment, I could only conclude that the sleep function never returns. Hard to believe if so. But maybe possible after reading this?
Hope the sharp eyes here can spot the cause. Or maybe it's only my AC56U?
Cheers
A while back I had my RT-AC56U running for over two months without reboot. I was surprised by how much the clock has drifted during the period. It's more than a minute. Lately i got sometime to look into the cause and found the issue puzzling.
By design asuswrt has a NTP daemon that will sync up my router's clock against a time server on reboot. After that, the daemon will re-sync the clock every 12 hours. If things work properly, the router's clock should show little drift from the time server at anytime.
I can check for clock drift by issuing
ntpclient -i 3 -d -h stdtime.gov.hk
where std time.gov.hk is a time server near me.Output will include something like this:
Total elapsed: 5947.00
Server stall: 81.06
Slop: 5865.94
Skew: 430724.57
Server stall: 81.06
Slop: 5865.94
Skew: 430724.57
It shows my router's clock has drifted by 430724.57 micro-seconds. That's a drift of ~0.43s since my manual sync about 10 hours ago.
Upon further experiments, I'm quite sure that asuswrt NTP daemon's per-12-hour sync does not happen. I can see the problem in merlin 43_2 and merlin 44. It could exist in less recent merlin versions (which were further complicated by other NTP related issue) as well as asus stock versions.
By looking at the NTP daemon code here, with my experiments at the moment, I could only conclude that the sleep function never returns. Hard to believe if so. But maybe possible after reading this?
Hope the sharp eyes here can spot the cause. Or maybe it's only my AC56U?
Cheers