Re: [ntp:questions] NTPQ -P shows both IP and DNS name (parsing problem)

2017-06-21 Thread Jakob Bohm
On 21/06/2017 13:49, roman.mescherya...@gmail.com wrote: вторник, 20 июня 2017 г., 19:38:53 UTC+3 пользователь David Woolley написал: I think you are expected to use the relevant management request directly, rather than parse output intended for humans. That would avoid process startup, filteri

Re: [ntp:questions] NTPQ -P shows both IP and DNS name (parsing problem)

2017-06-21 Thread Dan Geist
- On Jun 21, 2017, at 7:49 AM, roman mescheryakov roman.mescherya...@gmail.com wrote: > вторник, 20 июня 2017 г., 19:38:53 UTC+3 пользователь David Woolley написал: >> I think you are expected to use the relevant management request >> directly, rather than parse output intended for humans.

Re: [ntp:questions] NTPQ -P shows both IP and DNS name (parsing problem)

2017-06-21 Thread roman . mescheryakov
вторник, 20 июня 2017 г., 19:38:53 UTC+3 пользователь David Woolley написал: > I think you are expected to use the relevant management request > directly, rather than parse output intended for humans. That would > avoid process startup, filtering, and DNS costs. What does it mean to “use the re

Re: [ntp:questions] NTPQ -P shows both IP and DNS name (parsing problem)

2017-06-20 Thread David Woolley
On 20/06/17 14:55, roman.mescherya...@gmail.com wrote: -193.11.114.43 (tor1.mdfnet.se) See the line starting with “-193.11.114.43 (tor1.mdfnet.se)” This strange peer breaks extracting fields by index. For the above example it extracts “(“ as “refid” value instead of “75.17.28.47” and “29.118”

[ntp:questions] NTPQ -P shows both IP and DNS name (parsing problem)

2017-06-20 Thread roman . mescheryakov
Hello everyone, The software developed by me uses ntpq -p to periodically (every 10 seconds) check ntpd time syncing status. ntpq output is parsed and fields “peer”, “refid” and “offset” are extracted by index. This works fine until some strange peer appears in the list for which both IP and DN