|< 1 2 >| | 11 Einträge, 2 Seiten |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
# /usr/ bin/perl -w use strict; use SNMP_util "0.90"; my @ip; my @ip_result_ping; my @ip_result_snmp; my $timeout=200; my $test; #my $path = "/media/hda5/nemo/txt/found_ip.txt"; my $path = "d:/nemo/txt/found_ip.txt"; open (IN, $path) || die "Fehler !\n"; @ip=<IN>; close(IN); print "eingelesene Ip-Adressen @ip\n"; foreach my $ip_address (@ip){ $test = `ping -n 2 -w $timeout $ip_address`; if ($test =~ /Antwort von $ip_address/){ push (@ip_result_ping, $ip_address); my $host = ("rmon12\@$ip_address"); my $snmp_result = &snmpget($host, 'sysDescr'); if ($snmp_result ne ""){ push (@ip_result_snmp, $ip_address); } } } print "erreichbare IP-Adressen @ip_result_ping\n"; print "Snmp unterstützen @ip_result_snmp\n";
|< 1 2 >| | 11 Einträge, 2 Seiten |