This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

How to check if the clock/ntp is correctly configured and synch'd?

I would like to run a compliance report on a cisco switch to check the clock time is synch'd correctly to a ntp server and matches the current time. I could run "show clock" on each switch but it would take "life" due to the size of our estate. 

Does anyone have any idea or tips how i do this please? I can search for the ntp lines in the config but for some reasons e.g. authentication keys may be incorrect and therefore the clock is not synch'd and "compliance report" would not work for what i am after.

Could someone assist and help out please?

Thank you.

Parents
  • I have basically the same requirement.  I found that most of the Cisco platfroms have an OID for that.  

    MIB NAME: CISCO-NTP-MIB

    OID: 1.3.6.1.4.1.9.9.168.1.1.11
    NAME: cntpSysSrvStatus

    DESCRIPTION:
    "Current state of the NTP server with values coded as follows:
    1: server status is unknown
    2: server is not running
    3: server is not synchronized to any time source
    4: server is synchronized to its own local

    Also there is another

    OID: 1.3.6.1.2.1.197.1.2.1

    NAME: ntpEntStatusCurrentMode

    DESCRIPTION:

    "The current mode of the NTP. The definition of each possible
    value is:
    notRunning(1) - NTP is not running.
    notSynchronized(2) - NTP is not synchronized to any time
    source (stratum = 16).
    noneConfigured(3) - NTP is not synch

Reply
  • I have basically the same requirement.  I found that most of the Cisco platfroms have an OID for that.  

    MIB NAME: CISCO-NTP-MIB

    OID: 1.3.6.1.4.1.9.9.168.1.1.11
    NAME: cntpSysSrvStatus

    DESCRIPTION:
    "Current state of the NTP server with values coded as follows:
    1: server status is unknown
    2: server is not running
    3: server is not synchronized to any time source
    4: server is synchronized to its own local

    Also there is another

    OID: 1.3.6.1.2.1.197.1.2.1

    NAME: ntpEntStatusCurrentMode

    DESCRIPTION:

    "The current mode of the NTP. The definition of each possible
    value is:
    notRunning(1) - NTP is not running.
    notSynchronized(2) - NTP is not synchronized to any time
    source (stratum = 16).
    noneConfigured(3) - NTP is not synch

Children