1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Missing NTP Checks in v1.25

Discussion in 'Tomato Firmware' started by asterger, Jun 10, 2009.

  1. asterger

    asterger Network Guru Member

    Tomato v1.25 set to check time every 2 hours. NTP Time Server set to Default. Every now and then, the log indicates a missing time check with no other error. Missing tests seem to occur at anytime. Is it a problem with ntp, ntp site availability or Tomato? This didn't occur in v1.23.

    Below a copy from the log.

    Thanks in advance for any light shed.

    -- asterger


    Jun 9 06:41:02 unknown user.info ntpc[2861]: Time Updated: Tue, 09 Jun 2009 06:41:02 -0400 [+1s]
    Jun 9 08:41:02 unknown user.info ntpc[2874]: Time Updated: Tue, 09 Jun 2009 08:41:02 -0400 [+1s]
    Jun 9 12:41:03 unknown user.info ntpc[2900]: Time Updated: Tue, 09 Jun 2009 12:41:03 -0400 [+2s]
    Jun 9 16:41:05 unknown user.info ntpc[2926]: Time Updated: Tue, 09 Jun 2009 16:41:05 -0400 [+1s]
     
  2. fyellin

    fyellin LI Guru Member

    I think I've been getting that message for a long time. Have you changed logging options?

    The message indicates exactly what it's saying. The Time Server indicates a time one or two seconds later than the router thinks it is, and it's updating its clock. You should certainly always see one of these at the start of the log, at which point it's updating the time from Jan 1, 1970, 00:00Z to the actual time.
     
  3. asterger

    asterger Network Guru Member

    Logging options remained the same throughout. If you look closely at the log fragment in the first post, you'll see its missing the 10:41:0x and 14:41:0x entries. This didn't happen on v1.23.

    Any ideas?

    -- Asterger
     
  4. mrap

    mrap Addicted to LI Member

    Have you tried logging without the default restrictions of 60 entries per minute?
     
  5. SgtPepperKSU

    SgtPepperKSU Network Guru Member

    Have you considered that maybe the time didn't need to be updated on those intervals? You are dealing with only 1-2 second changes on the ones that do update. It's entirely possible that it occasionally is slightly within the accuracy threshold (<1s?) of not needing to update the time.
     
  6. mrap

    mrap Addicted to LI Member

    For no update needed, mine shows this:
    user.info ntpc[573]: Time Updated: no change needed
     
  7. SgtPepperKSU

    SgtPepperKSU Network Guru Member

    Ah, I see. I guess mine has never been accurate enough to see that message... :rolleyes:
     
  8. asterger

    asterger Network Guru Member

    mrap - Missing reports occur at random. As far as utilization, even when the router is in use, there are only 2 users. Hardware is an SL with Total / Free Memory 30.02 MB / 20.76 MB (69.17%). Under Logging, Generate Marker is Disabled as is all Connection Logging.

    I don't believe the router is being taxed at all.

    I have never seen the user.info ntpc[573]: Time Updated: no change needed message as with a 2-hour interval there is always at least a 1-second offset.

    Any other explanations?

    Thanks,

    -- asterger
     
  9. asterger

    asterger Network Guru Member

    mrap - As a test, I did reduce logging limit to 0. That change had no effect. Still had missing ntp entries.

    Any other suggestions?

    -- asterger
     
  10. mrap

    mrap Addicted to LI Member

    I'm stumped. Hopefully someone with more experience can help.
     
  11. asterger

    asterger Network Guru Member

    To add a more information, I enabled logging Cron. Below is a recent log fragment. Note the missing Jun 12 02:41:01 and Jun 12 06:41:01 ntp reports.

    Are there any other logging parameters that would aid in troubleshooting?

    Thanks,

    -- Asterger

    Jun 11 22:41:01 unknown cron.err crond[3492]: USER root pid 3602 cmd ntpsync --cron
    Jun 11 22:41:02 unknown user.info ntpc[3603]: Time Updated: Thu, 11 Jun 2009 22:41:02 -0400 [+1s]
    Jun 12 00:41:01 unknown cron.err crond[3492]: USER root pid 3619 cmd ntpsync --cron
    Jun 12 00:41:02 unknown user.info ntpc[3620]: Time Updated: Fri, 12 Jun 2009 00:41:02 -0400 [+1s]
    Jun 12 02:41:01 unknown cron.err crond[3492]: USER root pid 3632 cmd ntpsync --cron
    Jun 12 04:41:01 unknown cron.err crond[3492]: USER root pid 3645 cmd ntpsync --cron
    Jun 12 04:41:03 unknown user.info ntpc[3646]: Time Updated: Fri, 12 Jun 2009 04:41:03 -0400 [+2s]
    Jun 12 06:41:01 unknown cron.err crond[3492]: USER root pid 3658 cmd ntpsync --cron
    Jun 12 08:41:01 unknown cron.err crond[3492]: USER root pid 3671 cmd ntpsync --cron
    Jun 12 08:41:02 unknown user.info ntpc[3672]: Time Updated: Fri, 12 Jun 2009 08:41:02 -0400 [+1s]
     
  12. Elbart

    Elbart LI Guru Member

    Does it go back to a two-hour-interval or is it sticking to the four-hour-interval?
     
  13. asterger

    asterger Network Guru Member

    Interval is consistently 4 hours or greater: 4, 4, 20, 16, 6, 4, 4, 20, 6, 6, 6, 6, 6, 6...

    I'll try every hour next.

    Thanks,

    -- asterger
     
  14. teddy_bear

    teddy_bear Network Guru Member

    asterger,
    He-he :wink:...

    In the official Tomato version, when ntpc doesn't need to update time, it doesn't output any messages to the system log.
    So everything looks fine in your log - the cron job is getting executed every 4 hrs, but sometimes the time doesn't need to be corrected - hence no "Time Updated" messages...

    I guess mrap is using my USB mod (or any other Tomato mod that includes these ntpc changes) - that's what makes Tomato to output "Time Updated: no change needed" message that is not present in official version, and that's what confused you guys ;)...
     
  15. SgtPepperKSU

    SgtPepperKSU Network Guru Member

    You sure about that? That was my first instinct as well (thus, my earlier post), but, looking at the source, it appears Tomato should also output that message when no change is needed.

    EDIT: scratch that. It does output the message to standard output, but not to the syslog. I guess I shouldn't have second guessed myself so quickly...
     
  16. asterger

    asterger Network Guru Member

    So to clarify, standard Tomato does NOT write to the log when there is no change? If yes, what is the threshold of change? 1 second?

    Thanks,

    --asterger
     
  17. SgtPepperKSU

    SgtPepperKSU Network Guru Member

    That's correct, as Tomato only updates the time in whole second increments.
     

Share This Page