From: Helmut W. <hel...@gm...> - 2005-02-28 21:04:43
|
Lupe Christoph wrote: > Please send the output of > ntpq -c "hostnames no" -c peers via1:/# ntpq -c "hostnames no" -c peers remote refid st t ====================================== -81.169.158.205 192.53.103.103 2 u x193.204.114.232 .IEN. 1 u -212.82.32.15 .PPS. 1 u +192.168.0.11 .SHM. 1 u *127.127.28.0 .SHM. 0 l -217.19.37.20 192.53.103.103 14 u -193.81.13.2 131.188.3.220 2 u -194.158.155.98 131.130.1.11 3 u +192.53.103.104 .PTB. 1 u 127.127.1.0 LOCAL(0) 13 l And ntpq at two different moments: via1:/# ntpq -p remote refid st t ====================================== -change2linux.co 192.53.103.103 2 u xntp1.ien.it .IEN. 1 u -212-82-32-15.ip .PPS. 1 u +via2.nack.at .SHM. 1 u *SHM(0) .SHM. 0 l -nav.metrologie. 192.53.103.103 14 u -mbox.eunet.at 131.188.3.220 2 u -orfroufh5.apa.n 131.130.1.11 3 u +ntp2.ptb.de .PTB. 1 u LOCAL(0) LOCAL(0) 13 l via1:/# ntpq -p remote refid st t ====================================== -change2linux.co 192.53.103.103 2 u xntp1.ien.it .IEN. 1 u -212-82-32-15.ip .PPS. 1 u +via2.nack.at .SHM. 1 u *SHM(0) .SHM. 0 l -nav.metrologie. 192.53.103.103 14 u -mail.sime.com 130.149.17.21 2 u -orfroufh5.apa.n 131.130.1.11 3 u +ntp2.ptb.de .PTB. 1 u LOCAL(0) LOCAL(0) 13 l The server definitions: via1:/# cat /etc/ntp.conf | grep \^server server europe.pool.ntp.org server ntp1.ien.it server time1.one4vision.de server 192.168.0.11 server 127.127.28.0 mode 1 prefer server time.metrologie.at server ntp.austria.eu.net server ts1.orf.at server ptbtime2.ptb.de server 127.127.1.0 > The plugin uses the IP addresses and does a reverse lookup with > gethostbyaddr() on them. That's also the reason you don't see SHM(0) and > LOCAL(0). I understand. So we can distinguish the following cases: Case 1: The real server changes at start of ntpd. This is the case in using *.pool.ntp.org, where they have a sort of round robin. Case 2: The name does not resolve, because of DNS(-entry) missing. Case 3: The same IP has different results after gethostbyaddr() - a sort of "reverse round robin". This is the case with ntp.austria.eu.net, which resolves as mbox.eunet.*, mail.sime.*, endjinn.austria.*, relay2.austria.* etc. Case 4: A new server is added to /etc/ntp.conf and ntpd is restarted. >>2nd Problem: >>------------ >>The peers are sorted alphabetically. I would prefer them in the order of >>ntp.conf=ntpq. > That's what Munin always does. The plugin delivers the output as it > reads the ntpq output, but sequence information is lost. The sequence (in /etc/ntp.conf) is the only reliable index - IMHO. Except someone edited but did not restart ... Thus the IPs of ntpq -c "hostnames no" -c peers are reliable and unique. Except for *.pool.ntp.org ... >>3rd Problem: >>------------ >>The first entry of the ntpq output is europe.pool.ntp.org in ntp.conf >>and changes each time after restart of ntp. Therefor I would like to >>label it europe.pool.ntp.org. > That's hard to do. The plugin is written the way it is because ntpq > truncates the host names. I haven't found a way to get the complete host > names through ntpq. ACK. I will think about a solution. But first I have to configure other things. Thanks. Helmut Wollmersdorfer |