From 1485967543ce1517e53b41132775feb3cecb1425 Mon Sep 17 00:00:00 2001 From: Eoin Brazil Date: Wed, 21 Jan 2015 15:15:44 +0000 Subject: [PATCH 1/2] Add NTP checks for config, status and time Added a new section to capture NTP details for configuration, status and the time details if it is running. --- mdiag/mdiag.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mdiag/mdiag.sh b/mdiag/mdiag.sh index 7d1a8dfc..d2cd4cc5 100644 --- a/mdiag/mdiag.sh +++ b/mdiag/mdiag.sh @@ -234,6 +234,11 @@ msection networks getfiles /etc/networks msection rpcinfo rpcinfo -p msection netstat netstat -anpoe +# Network time info +msection ntpd_configuration chkconfig --list ntpd +msection ntpd_status ntpstat +msection ntpd_timeinfo ntpq -p + # Hardware info msection dmesg dmesg msection lspci lspci -vvv From 2ccaa4daf4794c8a13c1be43311fb58b89dbfdeb Mon Sep 17 00:00:00 2001 From: Eoin Brazil Date: Tue, 3 Nov 2015 15:19:35 +0000 Subject: [PATCH 2/2] Added ntptime to Network time info section Hi Kev, Whilst ntptime isn't exactly the same it does indicate that NTP is on / running with the code 0 (OK). Here's the sample output from TSPROJ-612 for just ntptime. [ec2-user@ip-10-36-183-212 ~]$ ntptime ntp_gettime() returns code 0 (OK) time d9e34c90.948f42c8 Tue, Nov 3 2015 10:09:04.580, (.580311333), maximum error 1005015 us, estimated error 53 us, TAI offset 0 ntp_adjtime() returns code 0 (OK) modes 0x0 (), offset 91.282 us, frequency -25.108 ppm, interval 1 s, maximum error 1005015 us, estimated error 53 us, status 0x2001 (PLL,NANO), time constant 6, precision 0.001 us, tolerance 500 ppm, --- mdiag/mdiag.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/mdiag/mdiag.sh b/mdiag/mdiag.sh index d2cd4cc5..ee2b759a 100644 --- a/mdiag/mdiag.sh +++ b/mdiag/mdiag.sh @@ -238,6 +238,7 @@ msection netstat netstat -anpoe msection ntpd_configuration chkconfig --list ntpd msection ntpd_status ntpstat msection ntpd_timeinfo ntpq -p +msection ntpd_ntptime ntptime # Hardware info msection dmesg dmesg