Posted: Sun Jun 24, 2018 14:01 Post subject: wrt1200acv2 clock adds 1 minute fast each day - solved
i've tried a variety of NPT client server/ip
i've tried a variety of firmware beta
and i still gain a minute every day and
am forced to save/update the setup page weekly
to get the time back near the actual UTC-5 time.
normally i would not care so much, but i'm running
YAMonitor which is obviously time stamp sensitive.
is there any solution? or does my box simply have
a fast clock crystal and i'm stuck with this warp,
since my box is well out of warranty and otherwise
works flawlessly
is there some way that dd-wrt can save/update with ntp
to synchronize more frequently, such as daily (overnight)?
so i don't have manually do it each week.
i do NOT want to do an automatic reboot of the router
(administration, keep alive, schedule reboot)
because that would disrupt other endpoints that i use.
those wifi endpoints already have accurate clocks,
and i don't want to have to auto reboot them as well.
i also don't want to reboot because verizon fios dhcp
often assigns me a new public wan ip after a reboot,
which i know makes no sense, but they do it anyway.
i would rather keep the same wan ip unless i have a
specific security reason to release it.
Last edited by consorts on Tue Jun 26, 2018 20:14; edited 1 time in total
FIRMWARE:OpenWrt SNAPSHOT r8217-2cc821e / LuCI Master (git-18.276.41146-280dd33) MODEM:ARRIS SURFBoard SB8200 ROUTER:Linksys WRT32X USB NAS:Western Digital BLACK 1 TB Hardrive + Startech USB 3.0 External SATA III Enclosure
FIRMWARE:OpenWrt SNAPSHOT r8217-2cc821e / LuCI Master (git-18.276.41146-280dd33) MODEM:ARRIS SURFBoard SB8200 ROUTER:Linksys WRT32X USB NAS:Western Digital BLACK 1 TB Hardrive + Startech USB 3.0 External SATA III Enclosure
Joined: 14 Dec 2015 Posts: 774 Location: 127.0.0.1
Posted: Mon Jun 25, 2018 7:40 Post subject:
d0ug wrote:
The reason this happens is that AFAIK the built in NTP config in DDWRT only updates the time ONCE at boot up. None of these routers have built in RTC hardware, so all the time keeping is done in software which is notoriously inaccurate over time. So you either need to setup a cron job to sync it at least once a day, or under the admin tab schedule your router to reboot daily at some time you typically don't use the internet.
From my syslog, all three of my WRT's update time at regular intervals. _________________ Tutorial for flashing WRT series WRT Installation,Upgrade & Basic Setup–Cliff Notes
r52242: WRT3200ACM, WRT1200ACv1 & 1 Velop in bridge mode(IoT subnet), r52242 WRT1900ACv1 AP
Velop:2 WHW0101, RE6500, RE9000(AP)
Spectrum - 1000/50
SysLog Watcher 5, New security Onion box coming soon, Fingboxes, PiHoles, NEMS, Cacti, rpisurv
time keeping is done in software which is notoriously inaccurate over time.
i really appreciate you adding this - makes me feel better that my hardware isn't defective, it's just one of the minor compromises we pay for using dd-wrt instead of manufacturer firmware.
at first i let cron do the job every hour, but then i noticed during that re-sync moment my internet connection would drop to everyone on my lan for a minute - that's not something we can endure so often. so i got up at 3am and save/applied a 24 hour job instead. now i'm curious to see if i wake up one day with a different public IP address (like I might from a full power cycle reboot).
i guess my question now; is there some less intrusive variation of this command that re-syncs your time with ntp without disrupting your internet connection every time?
FIRMWARE:OpenWrt SNAPSHOT r8217-2cc821e / LuCI Master (git-18.276.41146-280dd33) MODEM:ARRIS SURFBoard SB8200 ROUTER:Linksys WRT32X USB NAS:Western Digital BLACK 1 TB Hardrive + Startech USB 3.0 External SATA III Enclosure
Joined: 05 Apr 2017 Posts: 981 Location: Louisiana, USA
Posted: Mon Jun 25, 2018 20:44 Post subject:
d0ug wrote:
Since I wasn't 100% certain about how each of those 3 different ways to run hourly jobs are interpreted. I have added the following to my cron at 1:03pm. I'll see what the time stamps in those 3 files look like later this evening
0 * * * * root date >> /tmp/0.txt
*/60 * * * * root date >> /tmp/60.txt
*/1 * * * root date >> /tmp/1.txt
Even a minute after adding them there are still no files generated. So it is quite likely they are all the same and will all just run at XX:00
**EDIT**
Looks like 0 * * * * and */60 * * * * are the same. The */1 * * * appears to not run. There is no output file. It probably needs to be formatted as * */1 * * *. Another odd issue, cron seems to run the jobs twice since there are double time stamps.
root@RouterAP:/tmp# cat 0.txt
Mon Jun 25 14:00:00 EDT 2018
Mon Jun 25 14:00:00 EDT 2018
Mon Jun 25 15:00:00 EDT 2018
Mon Jun 25 15:00:00 EDT 2018
root@RouterAP:/tmp# cat 60.txt
Mon Jun 25 14:00:00 EDT 2018
Mon Jun 25 14:00:00 EDT 2018
Mon Jun 25 15:00:00 EDT 2018
Mon Jun 25 15:00:00 EDT 2018
root@RouterAP:/tmp#
FIRMWARE:OpenWrt SNAPSHOT r8217-2cc821e / LuCI Master (git-18.276.41146-280dd33) MODEM:ARRIS SURFBoard SB8200 ROUTER:Linksys WRT32X USB NAS:Western Digital BLACK 1 TB Hardrive + Startech USB 3.0 External SATA III Enclosure
yes i use DNSMasq, but i found the problem i was having.
thanks to d0ug breaking down the command syntax
i put in; * 4 * * * root ntpclient us.pool.ntp.org
which works great at sync'ing me at 4am each day
without any isp interruptions (like a save+apply).
my "software" clock ends up 90sec fast
every 24 hours but i can live with that.
before d0ug's post i thought i had to wake up at 4am
and use; * 24 * * * root ntpclient us.pool.ntp.org
as in 24 hours from now sync again, which i now know
was complete nonsense... so thanks d0ug
anyway, i learned a lot of useful stuff on this thread,
as you regulars here are great at sharing your wisdom.