3 my ($host,$switchtype,$community) = @ARGV;
5 open SNMP, "snmpwalk -Os -c $community -v 2c $host ifDescr |"
9 print "delete from portnames where switchtype='$switchtype';\n";
13 /^ifDescr\.(\d+) = STRING: (.*)$/ or next;
15 print "insert into portnames (switchtype,port,description) values ('$switchtype',$1,'$2');\n";