Changeset 310
- Timestamp:
- Oct 19, 2017, 10:00:46 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r309 r310 208 208 else { 209 209 print {*STDERR} "klask: command $cmd not found\n\n"; 210 $CMD_DB{ help}->();210 $CMD_DB{'help'}->(); 211 211 exit 1; 212 212 } … … 354 354 355 355 for my $sw_kind (keys %SWITCH_KIND) { 356 next if not $sw_snmp_description =~ m/$SWITCH_KIND{$sw_kind}->{ match}/ms; # option xms break search, why ?356 next if not $sw_snmp_description =~ m/$SWITCH_KIND{$sw_kind}->{'match'}/ms; # option xms break search, why ? 357 357 358 358 return $SWITCH_KIND{$sw_kind}->{'model'}; … … 369 369 370 370 for my $sw_kind (keys %SWITCH_KIND) { 371 next if not $sw_snmp_description =~ m/$SWITCH_KIND{$sw_kind}->{ match}/ms; # option xms break search, why ?371 next if not $sw_snmp_description =~ m/$SWITCH_KIND{$sw_kind}->{'match'}/ms; # option xms break search, why ? 372 372 last if not exists $SWITCH_KIND{$sw_kind}->{'revision'}; 373 373 … … 556 556 # 21->24 45->48 557 557 SWITCH_PORT_IGNORE: 558 for my $portignore (@{$sw->{ portignore}}) {558 for my $portignore (@{$sw->{'portignore'}}) { 559 559 next LOOP_ON_SWITCH if $swport_hr eq $portignore; 560 560 my ($swport_hr_limited) = split /$SEP_AGGREGATOR_PORT/, $swport_hr; # Beginning of the swith port (Aggregator) … … 604 604 605 605 SWITCH_PORT_IGNORE: 606 for my $portignore (@{$sw->{ portignore}}) {606 for my $portignore (@{$sw->{'portignore'}}) { 607 607 if ($swport_hr eq $portignore) { 608 608 $session->close; … … 1341 1341 } 1342 1342 for my $sw (@SWITCH_LIST) { 1343 push @{$sw->{ portignore}}, $db_switch_output_port{$sw->{'hostname'}} if exists $db_switch_output_port{$sw->{'hostname'}};1343 push @{$sw->{'portignore'}}, $db_switch_output_port{$sw->{'hostname'}} if exists $db_switch_output_port{$sw->{'hostname'}}; 1344 1344 if ( exists $db_switch_chained_port{$sw->{'hostname'}} ) { 1345 1345 chop $db_switch_chained_port{$sw->{'hostname'}}; 1346 push @{$sw->{ portignore}}, split m/ : /xms, $db_switch_chained_port{$sw->{'hostname'}};1347 } 1348 # print "$sw->{'hostname'} ++ @{$sw->{ portignore}}\n";1346 push @{$sw->{'portignore'}}, split m/ : /xms, $db_switch_chained_port{$sw->{'hostname'}}; 1347 } 1348 # print "$sw->{'hostname'} ++ @{$sw->{'portignore'}}\n"; 1349 1349 } 1350 1350 } … … 1590 1590 or $mactimedb{$ip_mac}->{'hostname_fq'} =~ m/$RE_FLOAT_HOSTNAME/ 1591 1591 )) { 1592 print "remove ip ".$mactimedb{$ip_mac}->{ ip}."\n" if $verbose;1593 delete $computerdb->{$mactimedb{$ip_mac}->{ ip}};1592 print "remove ip ".$mactimedb{$ip_mac}->{'ip'}."\n" if $verbose; 1593 delete $computerdb->{$mactimedb{$ip_mac}->{'ip'}}; 1594 1594 $database_has_changed++; 1595 1595 } … … 2046 2046 next LOOP_ON_RECENT_COMPUTER if $switchportdb{$swpt}->{'hostname_fq'} !~ m/$RE_FLOAT_HOSTNAME/; 2047 2047 2048 my $src_ip = $switchportdb{$swpt}->{ ip};2048 my $src_ip = $switchportdb{$swpt}->{'ip'}; 2049 2049 my $src_timestamp = 0; 2050 2050 LOOP_ON_IP_ADDRESS:
Note: See TracChangeset
for help on using the changeset viewer.