What's new

NTP messages in log

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

narcisanuxxl

New Around Here
My rt-n66u has been on for almost 3 days. When I check the log this is all i see:
Feb 8 17:59:57 ntp: start NTP update
Feb 8 18:59:59 ntp: start NTP update
Feb 8 20:00:01 ntp: start NTP update
Feb 8 20:59:57 ntp: start NTP update
Feb 8 21:59:57 ntp: start NTP update
Feb 8 22:59:57 ntp: start NTP update
Feb 8 23:59:57 ntp: start NTP update
Feb 9 00:59:59 ntp: start NTP update
Feb 9 02:00:01 ntp: start NTP update
Feb 9 02:59:57 ntp: start NTP update
Feb 9 03:59:57 ntp: start NTP update
Feb 9 04:59:57 ntp: start NTP update
Feb 9 05:00:00 ntp: start NTP update
Feb 9 05:59:57 ntp: start NTP update
Feb 9 06:59:59 ntp: start NTP update
Feb 9 08:00:01 ntp: start NTP update
Feb 9 08:59:57 ntp: start NTP update
Feb 9 09:00:00 ntp: start NTP update
Feb 9 09:59:57 ntp: start NTP update
Feb 9 10:59:57 ntp: start NTP update
Feb 9 11:00:00 ntp: start NTP update
Feb 9 11:59:57 ntp: start NTP update
Feb 9 12:59:57 ntp: start NTP update
Feb 9 13:59:57 ntp: start NTP update
Feb 9 14:59:57 ntp: start NTP update
Feb 9 15:59:59 ntp: start NTP update
Feb 9 17:00:01 ntp: start NTP update
Feb 9 17:59:57 ntp: start NTP update
Feb 9 18:59:57 ntp: start NTP update
Feb 9 19:59:57 ntp: start NTP update


I'm running latest firmware from asus. Is this normal? Thank you.
 
It helps to know NTP is Network Time Protocol. Your router is making sure its clock is accurate. So as alluded to above, yes completely normal.

-Morgan
 
My rt-n66u has been on for almost 3 days. When I check the log this is all i see:
Feb 8 17:59:57 ntp: start NTP update
Feb 8 18:59:59 ntp: start NTP update
Feb 8 20:00:01 ntp: start NTP update
Feb 8 20:59:57 ntp: start NTP update
Feb 8 21:59:57 ntp: start NTP update
Feb 8 22:59:57 ntp: start NTP update
Feb 8 23:59:57 ntp: start NTP update
Feb 9 00:59:59 ntp: start NTP update
Feb 9 02:00:01 ntp: start NTP update
Feb 9 02:59:57 ntp: start NTP update
Feb 9 03:59:57 ntp: start NTP update
Feb 9 04:59:57 ntp: start NTP update
Feb 9 05:00:00 ntp: start NTP update
Feb 9 05:59:57 ntp: start NTP update
Feb 9 06:59:59 ntp: start NTP update
Feb 9 08:00:01 ntp: start NTP update
Feb 9 08:59:57 ntp: start NTP update
Feb 9 09:00:00 ntp: start NTP update
Feb 9 09:59:57 ntp: start NTP update
Feb 9 10:59:57 ntp: start NTP update
Feb 9 11:00:00 ntp: start NTP update
Feb 9 11:59:57 ntp: start NTP update
Feb 9 12:59:57 ntp: start NTP update
Feb 9 13:59:57 ntp: start NTP update
Feb 9 14:59:57 ntp: start NTP update
Feb 9 15:59:59 ntp: start NTP update
Feb 9 17:00:01 ntp: start NTP update
Feb 9 17:59:57 ntp: start NTP update
Feb 9 18:59:57 ntp: start NTP update
Feb 9 19:59:57 ntp: start NTP update


I'm running latest firmware from asus. Is this normal? Thank you.

NTP updates your router's clock. If you don't see any huge difference between your router and current time, it means at least your router gets the first update right on reboot. Then not a big deal.

I doubt it's actually updating anything every hour as the messages may imply. I would bet Asus engineers still haven't sorted out problems in their NTP process;).
 
My rt-n66u has been on for almost 3 days. When I check the log this is all i see:
Feb 8 17:59:57 ntp: start NTP update
Feb 8 18:59:59 ntp: start NTP update
Feb 8 20:00:01 ntp: start NTP update
Feb 8 20:59:57 ntp: start NTP update
Feb 8 21:59:57 ntp: start NTP update
Feb 8 22:59:57 ntp: start NTP update
Feb 8 23:59:57 ntp: start NTP update
Feb 9 00:59:59 ntp: start NTP update
Feb 9 02:00:01 ntp: start NTP update
Feb 9 02:59:57 ntp: start NTP update
Feb 9 03:59:57 ntp: start NTP update
Feb 9 04:59:57 ntp: start NTP update
Feb 9 05:00:00 ntp: start NTP update
Feb 9 05:59:57 ntp: start NTP update
Feb 9 06:59:59 ntp: start NTP update
Feb 9 08:00:01 ntp: start NTP update
Feb 9 08:59:57 ntp: start NTP update
Feb 9 09:00:00 ntp: start NTP update
Feb 9 09:59:57 ntp: start NTP update
Feb 9 10:59:57 ntp: start NTP update
Feb 9 11:00:00 ntp: start NTP update
Feb 9 11:59:57 ntp: start NTP update
Feb 9 12:59:57 ntp: start NTP update
Feb 9 13:59:57 ntp: start NTP update
Feb 9 14:59:57 ntp: start NTP update
Feb 9 15:59:59 ntp: start NTP update
Feb 9 17:00:01 ntp: start NTP update
Feb 9 17:59:57 ntp: start NTP update
Feb 9 18:59:57 ntp: start NTP update
Feb 9 19:59:57 ntp: start NTP update


I'm running latest firmware from asus. Is this normal? Thank you.

You will see that many NTP update when your internet is down. Once it sees the internet connection is on, it will get the time then the log stops. In other word, the router keeps trying to get the time until it gets one.:)
 
If you want the log to show more on stock firmware then you would need to change the log level.

Stock firmware has the log level set at 6 so change it to 7.

Enable telnet on the router then open a telnet session with Putty or something similar.

nvram set log_level=7

nvram commit

reboot

Now the router will also show DHCP messages of devices.

Example:

Feb 18 06:45:06 dnsmasq-dhcp[374]: DHCPDISCOVER(br0) 2c:b0:5d:xx:xx:xx
Feb 18 06:45:06 dnsmasq-dhcp[374]: DHCPOFFER(br0) 192.168.1.5 2c:b0:5d:xx:xx:xx
Feb 18 06:45:06 dnsmasq-dhcp[374]: DHCPREQUEST(br0) 192.168.1.5 2c:b0:5d:xx:xx:xx
Feb 18 06:45:06 dnsmasq-dhcp[374]: DHCPACK(br0) 192.168.1.5 2c:b0:5d:xx:xx:xx COM-MID1
Feb 18 07:00:01 ntp: start NTP update
Feb 18 07:59:57 ntp: start NTP update
Feb 18 08:59:57 ntp: start NTP update
Feb 18 09:10:23 dnsmasq-dhcp[374]: DHCPREQUEST(br0) 192.168.1.4 9c:d2:1e:xx:xx:xx
Feb 18 09:10:23 dnsmasq-dhcp[374]: DHCPACK(br0) 192.168.1.4 9c:d2:1e:xx:xx:xx
Feb 18 09:18:19 dnsmasq-dhcp[374]: DHCPREQUEST(br0) 192.168.1.3 00:11:d9:xx:xx:xx
Feb 18 09:18:19 dnsmasq-dhcp[374]: DHCPACK(br0) 192.168.1.3 00:11:d9:xx:xx:xx TIVO-7582001903D6537
Feb 18 09:59:59 ntp: start NTP update
Feb 18 10:47:26 dnsmasq-dhcp[374]: DHCPREQUEST(br0) 192.168.1.2 48:5b:39:xx:xx:xx
Feb 18 10:47:26 dnsmasq-dhcp[374]: DHCPACK(br0) 192.168.1.2 48:5b:39:xx:xx:xx M4A89TD
Feb 18 11:00:01 ntp: start NTP update
Feb 18 11:59:57 ntp: start NTP update
 
You will see that many NTP update when your internet is down. Once it sees the internet connection is on, it will get the time then the log stops. In other word, the router keeps trying to get the time until it gets one.:)

The latest stock firmware prints ntp update to the log about every hour now.
 
The latest stock firmware prints ntp update to the log about every hour now.

I see, if that is true many NTP servers might consider hourly frequency excessive and will ban the ip. Merlin must have tamed the *sucker*, the ntp update log on his firmwares are only shown the way I described above.
 
I see, if that is true many NTP servers might consider hourly frequency excessive and will ban the ip. Merlin must have tamed the *sucker*, the ntp update log on his firmwares are only shown the way I described above.

Yes, I've "fixed" the code so it will only retry again if the last update failed.

No idea if it's done on purpose or it's a bug. It appeared a few months ago when Asus revamped the NTP code, and they make it retry again after one hour if DST is enabled.
 
,
No idea if it's done on purpose or it's a bug. It appeared a few months ago when Asus revamped the NTP code, and they make it retry again after one hour if DST is enabled.

Is your code updating the time hourly too minus the log?
 
Is your code updating the time hourly too minus the log?

I just rechecked the code - that's correct. I only log if it was the first sync attempt.

Code:
diff --git a/release/src/router/rc/ntp.c b/release/src/router/rc/ntp.c
index da3ce18..a150142 100644
--- a/release/src/router/rc/ntp.c
+++ b/release/src/router/rc/ntp.c
@@ -164,7 +164,8 @@ int ntp_main(int argc, char *argv[])
                        stop_ntpc();
 
                        nvram_set("ntp_server_tried", server);
-                       logmessage("ntp", "start NTP update");
+                       if (nvram_match("ntp_ready", "0"))
+                               logmessage("ntp", "start NTP update");
                        ret = _eval(args, NULL, 0, &pid);
                        sleep(SECONDS_TO_WAIT);

The _eval() call is what runs "ntpclient".
 
Hourly seems excessive is there a way to change the time frequency like once a day?

You'd have to change it in the source code. At this point I don't feel the need to do so in my firmware, as I don't see any side effect of doing this.
 
I have recently been having a problem with my main router, I recently installed Merlin's FW 380.57 on ASUS RT-AC66U attempting to fix this problem but its the same result with stock FW (last 2 versions 3.0.0.4.378_9459 and 3.0.0.378_9533 same result)

I cannot get the NTP time to work on this router at all. If I reboot it, it keeps resetting back to Jul 30 2015 and then I can Telnet into the router and set the time there to reflect below. System Tab under Administration has pool.ntp.org (default) even tried using others to no avail, set the DST dates and times for -6 GMT Central (my location) but it just says * Reminder: The system time has not been synchronized with an NTP server. When I check the logs I receive this non stop below (small excerpt).

Feb 25 21:54:53 ntp: start NTP update
Feb 25 21:55:06 hour monitor: daemon is starting
Feb 25 21:55:06 hour monitor: ntp is not syn
Feb 25 21:55:23 ntp: start NTP update

As I said this happens on Merlin and ASUS FW, factory resets etc not fixing it. Any ideas how I can slap this puppy around? Oh yea and my 2nd router set as an AP to this problem main router has stock ASUS FW 378_9459 and pulls the time just fine I don't understand. Thanks lemme know if I can provide any thing else.
 
You'd have to change it in the source code. At this point I don't feel the need to do so in my firmware, as I don't see any side effect of doing this.
If you want to 'raid' my fork, I added it as an option....it's spread across about 3 commits as I was fixing ntp late last year, so probably would be easier to just look at ntp.c.
 
If you want to 'raid' my fork, I added it as an option....it's spread across about 3 commits as I was fixing ntp late last year, so probably would be easier to just look at ntp.c.

Adding an option to adjust the frequency of NTP updates is something I would consider to be "feature creep" - serves no real purposes beside confusing users, and wasting valuable nvram space.
 
Adding an option to adjust the frequency of NTP updates is something I would consider to be "feature creep" - serves no real purposes beside confusing users, and wasting valuable nvram space.
Respectfully disagree on this one.....but I know what you are saying, there have been some changes you made that I thought the same thing and bypassed. That's what is so good about open source.....choices :)
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top