Lines Matching refs:host
36 (((@_ != 1) && !$opts->{host} && !@{$opts->{'host-list'}}))) {
51 if ($opts->{host}) {
52 push @hosts, $opts->{host};
56 push @hosts, @{$opts->{'host-list'}};
75 my $host;
76 for $host (@hosts) {
77 scan_host($host, 0, $host => 1);
99 my ($host, $level, %trace) = @_;
108 if (exists $known_host_info{$host}) {
112 ($offset, $stratum) = ntp_sntp_line($host);
116 my $vars = ntp_read_vars(0, [qw(processor system daemon_version)], $host) || {};
141 my $peers_ref = ntp_peers($host);
150 # Add scanned host to known_hosts array
151 #push @known_hosts, $host;
153 $known_host_info{$host} = sprintf "%2d %9.3f %-11s %-12s %s",
159 $known_host_info{$host} = " ?";
161 $known_host_peers{$host} = [@peers];
164 if ($stratum || $known_host) { # Valid or known host
165 my $printhost = ' ' x $level . (do_dns($host) || $host);
166 # Shorten host string
171 if ($showpeers && ($known_host_info{$host} ne " ?")) {
172 $printhost .= " (" . @{$known_host_peers{$host}} . ")";
174 # Finally print complete host line
176 (substr $printhost, 0, 32), $known_host_info{$host};
178 $trace{$host} = 1;
180 foreach my $peer (@{$known_host_peers{$host}}) {
184 # Shorten host string
195 else { # We did not get answers from this host
196 my $printhost = ' ' x $level . (do_dns($host) || $host);