Junos OS

Expand all | Collapse all

Meaning of "Time Source" in >show system uptime

  • 1.  Meaning of "Time Source" in >show system uptime

    Posted 10-15-2020 08:01

    bonjour tout le monde, 

    how about an easy one, this time ? what is the meaning of "time source: Local Clock" in Show system uptime? 

     

    All my Ex2300 config include a "set system ntp server <address> " pointing to my  local NTP server. Works fine.

    We changed the server address last week. So when I  installled today a switch that was shelved last february,  it could not find the old server and after power up, a "show system uptime" gave me this

     

    ========================================================
    Current time: 2020-02-24 10:50:22 EST
    Time Source: LOCAL CLOCK 
    System booted: 2020-02-24 10:32:56 EST (00:17:26 ago)
    Protocols started: 2020-02-24 10:37:31 EST (00:12:51 ago)
    Last configured: 2020-02-24 10:40:59 EST (00:09:23 ago) by root
    
    =========================================================

    so I went ahead and issued a new set statement with the correct address. 

    then I forced the switch to get the right time (run set date ntp <address>)

    and finally checked that everything was back to normal time

     

    ============================================================
    
    root@mrct-nddn-02-BYPASS-2020-02-13# run show system uptime 
    Current time: 2020-10-15 10:20:37 EDT
    Time Source: LOCAL CLOCK 
    System booted: 2020-10-15 10:01:37 EDT (00:19:00 ago)
    Protocols started: 2020-10-15 10:06:11 EDT (00:14:26 ago)
    Last configured: 2020-02-24 10:50:45 EST (33w2d 22:29 ago) by root
    
    ===================================================================

    All worked well, but I am puzzled by the fact that Time Source is still shown as Local Clock. I was expecting "local Clock" to change to "NTP Server" or something similar. 

    How do I know that the switch is actuallly checking the NTP server , and not running in local mode ?

     

    Merci, 

    Michel Lapointe

     

     



  • 2.  set date ntp Re: Meaning of "Time Source" in >show system uptime

     
    Posted 10-15-2020 08:09

    "set date ntp ..." is a one-off command and message exchange with that ntp server to set the local clock. It doesn't ensure perioding ntp sync. For that you need a working NTP config.



  • 3.  Betreff: Meaning of "Time Source" in >show system uptime

     
    Posted 10-15-2020 09:42

    Hello Michel,

     

    can you please paste the output of the following command:

    show configuration system ntp

    set date ntp



  • 4.  Re: Meaning of "Time Source" in >show system uptime

    Posted 10-15-2020 19:34

    When you configure ntp and ntp is in sync with peers you should see Time source "NTP CLOCK"

     

    > show system uptime
    Current time: 2020-10-16 08:25:12 ALMT
    Time Source:  NTP CLOCK
    System booted: 2020-10-16 03:24:24 ALMT (05:00:48 ago)
    Protocols started: 2020-10-16 03:25:57 ALMT (04:59:15 ago)
    

     

    when ntp in sync , synced peer should be marked with "*", if local time on your router and time on ntp peers differs too much, it is required to set "local time" manually  using "set date ..." command, or you can try with "set date ntp force" command

     

    > show ntp associations
    
       remote         refid           st t when poll reach   delay   offset  jitter
    ===============================================================================
    *10.10.10.10     10.10.10.20    2 -  118  128  377   34.562   -1.209   0.442