You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.
We don't yet support parsing 'when' for get_ntp_stats() because Last Update Time is returned as an absolute time, not a relative time. To solve this, we have to get the current system time and then calculate a relative time. This will never be perfect because the current system time is not displayed within the same command, and we will have a variable delay between executing commands ('show sntp server' and 'show clock')
CLI output:
nvansswi1#show sntp server
Server Host Address: 66.135.108.133
Server Type: IPv4
Server Stratum: 2
Server Reference Id: NTP Bits: 0x44c6efdc
Server Mode: Server
Server Maximum Entries: 8
Server Current Entries: 2
SNTP Servers
------------
Host Address: 66.135.102.133
Address Type: IPv4
Priority: 1
Version: 4
Port: 123
**Last Update Time: Jun 10 20:34:48 2020**
Last Attempt Time: Jun 10 21:07:55 2020
Last Update Status: Success
Total Unicast Requests: 183689
Failed Unicast Requests: 130
Host Address: 66.135.108.133
Address Type: IPv4
Priority: 1
Version: 4
Port: 123
**Last Update Time: Jun 10 22:09:53 2020**
Last Attempt Time: Jun 10 22:12:01 2020
Last Update Status: Success
Total Unicast Requests: 137398
Failed Unicast Requests: 130
nvansswi1#show clock
15:27:41 PDT(UTC-7:00) Jun 10 2020
Time source is SNTP
Code section:
ntp_stats = []
for server in show_sntp_stats:
if server['status'] == 'Success':
synchronized = True
else:
synchronized = False
ntp_stats.append(
{
'remote': server['server_ip'],
# Not supported
'referenceid': '',
'synchronized': synchronized,
# Not supported
'stratum': -1,
# We only support parsing unicast servers right now
'type': 'u',
** # We don't support parsing this right now
'when': '',**
# Not supported
'hostpoll': -1,
# Not supported
'reachability': -1,
# Not supported
'delay': -0.0,
# Not supported
'offset': -0.0,
# Not supported
'jitter': -0.0,
}
)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We don't yet support parsing 'when' for get_ntp_stats() because Last Update Time is returned as an absolute time, not a relative time. To solve this, we have to get the current system time and then calculate a relative time. This will never be perfect because the current system time is not displayed within the same command, and we will have a variable delay between executing commands ('show sntp server' and 'show clock')
CLI output:
Code section:
The text was updated successfully, but these errors were encountered: