def get_ntp_stats(self):
ntp_stats = []<EOL>command = "<STR_LIT>"<EOL>output = self._send_command(command)<EOL>for line in output.splitlines():<EOL><INDENT>if line == "<STR_LIT>" or "<STR_LIT:address>" in line or "<STR_LIT>" in line:<EOL><INDENT>continue<EOL><DEDENT>if "<STR_LIT>" in line:<EOL><INDENT>return []<EOL><DEDENT>elif len(line.split()) == <NUM_LIT:9>:<EOL><INDENT>address, ref_clock, st, when, poll, reach, delay, offset, disp = (<EOL>line.split()<EOL>)<EOL>address_regex = re.match(r"<STR_LIT>", address)<EOL><DEDENT>try:<EOL><INDENT>ntp_stats.append(<EOL>{<EOL>"<STR_LIT>": py23_compat.text_type(address_regex.group(<NUM_LIT:2>)),<EOL>"<STR_LIT>": ("<STR_LIT:*>" in address_regex.group(<NUM_LIT:1>)),<EOL>"<STR_LIT>": py23_compat.text_type(ref_clock),<EOL>"<STR_LIT>": int(st),<EOL>"<STR_LIT:type>": "<STR_LIT:->",<EOL>"<STR_LIT>": py23_compat.text_type(when),<EOL>"<STR_LIT>": int(poll),<EOL>"<STR_LIT>": int(reach),<EOL>"<STR_LIT>": float(delay),<EOL>"<STR_LIT>": float(offset),<EOL>"<STR_LIT>": float(disp),<EOL>}<EOL>)<EOL><DEDENT>except Exception:<EOL><INDENT>continue<EOL><DEDENT><DEDENT>return ntp_stats<EOL>
Implementation of get_ntp_stats for IOS.