https://redmine.pfsense.org/https://redmine.pfsense.org/favicon.ico?16780521162020-03-01T10:14:03ZpfSense bugtrackerpfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=448672020-03-01T10:14:03ZAdam Thompsonathompso@athompso.net
<ul></ul><p>Ohhh... as soon as it selects a sane peer, the problem goes away.<br />Now I don't know if the problem is "Outlier" or if the problem is IPv6 addresses.</p> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=449322020-03-08T06:03:26ZManuel Piovan
<ul></ul><p>affected version also 2.5.0 <br />Candidate 192.168.10.200 .GPS. 1 u 28 64 17 0.187 -0.436 0.048<br />Candidate 172.17.0.100 192.168.10.200 2 u 25 64 17 0.971 -0.111 0.065<br />Active Peer 2001:470:26:5dc .GPS. 1 u 21 64 17<br /> ^ address truncated<br /> ntp widget<br />Sync Source 2001:470:26:5dc:ffff:ffff:ffff:fffe (stratum )</p>
<p>ntp_status.widget.php line 41 -> exec("/usr/local/sbin/ntpq -pn -w $inet_version | /usr/bin/tail +3", $ntpq_output);</p>
<p>the problem is with the -w flag</p>
<p>[2.5.0-DEVELOPMENT][<a class="email" href="mailto:root@pfSense.kiokoman.home">root@pfSense.kiokoman.home</a>]/root: /usr/local/sbin/ntpq -pn -w | /usr/bin/tail +3<br />+192.168.10.200 .GPS. 1 u 24 64 377 0.272 -0.042 0.016<br />-172.17.0.100 192.168.10.200 2 u 7 128 377 1.053 -0.160 0.069<br />*2001:470:26:5dc:ffff:ffff:ffff:fffe<br /> .GPS. 1 u 13 64 377 0.279 -0.079 1.379<br /> 0.it.pool.ntp.org<br /> .POOL. 16 p - 64 0 0.000 +0.000 0.002<br />+185.19.184.35 193.204.114.233 2 u 15 64 377 18.030 +4.095 0.364<br />+212.45.144.3 193.204.114.232 2 u 66 64 377 18.574 +4.374 5.044<br />+46.235.141.130 85.199.214.99 2 u 7 128 377 31.823 +5.108 0.114<br />+212.45.144.88 193.204.114.233 2 u 2 128 377 18.133 +2.920 6.557<br />+85.199.214.99 .GPS. 1 u 7 64 377 46.107 +6.538 0.497<br />+162.159.200.1 10.39.8.8 3 u 9 128 377 17.660 +3.786 0.506</p>
<p>the regexp at line 48 does not match</p>
<p>without -w the address is truncated but regexp work and show the right stratum<br />Sync Source 2001:470:26:5dc (stratum 1, .GPS.)</p>
<p>introduced by Do not truncate IPv6 addresss in NTP widget (Bug <a class="issue tracker-1 status-3 priority-10 priority-lowest closed" title="Bug: NTP status widget shows truncated IPv6 address (Resolved)" href="https://redmine.pfsense.org/issues/4815">#4815</a>)</p> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=449352020-03-08T16:09:42ZViktor Gurov
<ul></ul><p>Also NTP status page shows truncated IPv6 address</p>
<p>from ntpq(1):<br /><pre>
-w, --wide
Display the full 'remote' value.
Display the full value of the 'remote' value.
If this requires more than 15 characters, display the full value, emit
a newline, and continue the data display properly indented on the next line.
</pre></p>
<p>This PR fixes both issues:<br /><a class="external" href="https://github.com/pfsense/pfsense/pull/4223">https://github.com/pfsense/pfsense/pull/4223</a></p> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=449372020-03-09T06:02:59ZManuel Piovan
<ul></ul><p>tested it, work partially</p>
<p>NTP status page is wrong for me the table is shifted of 1 place after the long ipv6 address</p>
<p>NTP widget show</p>
<p>2001:470:26:5dc:ffff:ffff:ffff:fffe (stratum .GPS.)</p>
<p>you can see refid .GPS. but stratum is empty</p>
<p>keep up the good work viktor, you have all my esteem for your hard work !</p> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=449382020-03-09T06:11:30ZManuel Piovan
<ul><li><strong>File</strong> <a href="/attachments/2964">Immagine.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2964/Immagine.jpg">Immagine.jpg</a> added</li><li><strong>File</strong> <a href="/attachments/2965">Immagine2.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2965/Immagine2.jpg">Immagine2.jpg</a> added</li></ul><p>screenshot added</p> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=449392020-03-09T06:56:42ZViktor Gurov
<ul></ul><p>Thanks for testing!</p>
<p>Can you show 'ntpq -pn -w' output?</p> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=449402020-03-09T07:19:58ZManuel Piovan
<ul><li><strong>File</strong> <a href="/attachments/2966">Immagine3.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2966/Immagine3.jpg">Immagine3.jpg</a> added</li></ul><p>of course<br />the problwm with the -w flag is that If this requires more than 15 characters, display the full value, emit a newline, and continue the data display properly indented on the next line.</p> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=449432020-03-09T07:49:06ZJim Pingle
<ul></ul><p>We've hit that newline issue before with <code>ntpq</code> output -- see <a class="issue tracker-1 status-3 priority-10 priority-lowest closed" title="Bug: NTP status widget shows truncated IPv6 address (Resolved)" href="https://redmine.pfsense.org/issues/4815">#4815</a></p>
<p>Probably will break more than it helps by adding <code>-w</code> in situations where it forces a newline, but perhaps we can find a regex or similar way to parse the output which mitigates that.</p> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=450032020-03-10T14:55:06ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Pull Request Review</i></li><li><strong>Target version</strong> set to <i>2.5.0</i></li></ul> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=450132020-03-11T06:58:33ZRenato Botelhorenato@netgate.com
<ul><li><strong>Status</strong> changed from <i>Pull Request Review</i> to <i>Feedback</i></li><li><strong>Assignee</strong> set to <i>Renato Botelho</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>PR has been merged. Thanks!</p> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=450442020-03-12T09:30:24ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>In Progress</i></li><li><strong>Assignee</strong> changed from <i>Renato Botelho</i> to <i>Jim Pingle</i></li><li><strong>% Done</strong> changed from <i>100</i> to <i>90</i></li></ul><p>Looks like the sed pattern I suggested will skip the last line in certain cases. Need to tinker with it some more. It also doesn't properly handle some peer lines since they can start with a space. That's an easy fix, but the last line being skipped is tougher. The sed <code>N</code> command has to operate on pairs of lines. I've found some workarounds but so far none have worked properly. Might have to use awk instead, but that is a bit more complex.</p> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=450492020-03-12T12:34:55ZJim Pingle
<ul><li><strong>% Done</strong> changed from <i>90</i> to <i>100</i></li></ul><p>I just pushed a new version using awk instead of sed which fixes the reported problem plus the other problem I found.</p> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=450502020-03-12T12:40:07ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Feedback</i></li></ul><p>Applied in changeset <a class="changeset" title="Use awk instead of sed for long NTP status lines. Fixes #10307" href="https://redmine.pfsense.org/projects/pfsense/repository/2/revisions/d09e19adf4253251dc2aa6d9edc3043e69096d4f">d09e19adf4253251dc2aa6d9edc3043e69096d4f</a>.</p> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=450552020-03-12T16:55:35ZRonald Schellberg
<ul></ul><p>Latest commit appears to work even for the peer on the last line. Thanks</p> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=450632020-03-13T07:34:50ZManuel Piovan
<ul></ul><p>yup work ok with my long ipv6 address too</p> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=450642020-03-13T07:52:04ZViktor Gurov
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li></ul><p>work ok with any address on 2.5.0.a.20200312.1334</p> pfSense - Bug #10307: NTP status widget doesn't display stratumhttps://redmine.pfsense.org/issues/10307?journal_id=490552020-10-30T09:11:42ZJim Pingle
<ul><li><strong>Category</strong> changed from <i>Dashboard</i> to <i>NTPD</i></li></ul>