# /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=; 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";