Changeset 78
- Timestamp:
- Mar 24, 2011, 6:33:19 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r77 r78 84 84 J9449A => { model => 'HP1810-8G', match => 'HP ProCurve 1810G - 8 GE' }, 85 85 J4093A => { model => 'HP2424M', match => 'HP J4093A ProCurve Switch 2424M' }, 86 J9279A => { model => 'HP2510G-24', match => 'ProCurve J9279A Switch 2510G-24' }, 86 87 J9280A => { model => 'HP2510G-48', match => 'ProCurve J9280A Switch 2510G-48' }, 87 88 J4813A => { model => 'HP2524', match => 'HP J4813A ProCurve Switch 2524' }, … … 216 217 my $nowtimestamp = time; 217 218 218 if ( $type eq 'fast' and ( not defined $timestamp or $timestamp < ( $nowtimestamp - 3* 3600 ) ) ) {219 if ( $type eq 'fast' and ( not defined $timestamp or $timestamp < ( $nowtimestamp - 1.1 * 3600 ) ) ) { 219 220 $ret{mac_address} = 'unknow'; 220 221 return %ret; … … 956 957 my $computerdb = YAML::Syck::LoadFile("$KLASK_DB_FILE"); 957 958 958 printf "%-2 5s %-4s %-40s %-15s %-18s %-16s %s\n", qw(Switch Port Hostname-FQ IPv4-Address MAC-Address Date VLAN);959 print "------------------------------------------------------------------------------------------------------------------------------------------- \n";959 printf "%-26s %-4s %-40s %-15s %-18s %-16s %s\n", qw(Switch Port Hostname-FQ IPv4-Address MAC-Address Date VLAN); 960 print "--------------------------------------------------------------------------------------------------------------------------------------------\n"; 960 961 961 962 LOOP_ON_IP_ADDRESS: … … 975 976 my $date = sprintf '%04i-%02i-%02i %02i:%02i', $year, $mon, $mday, $hour, $min; 976 977 977 printf "%-2 6s %2s <------- %-40s %-15s %-18s %-16s %s\n",978 printf "%-27s %2s <------- %-40s %-15s %-18s %-16s %s\n", 978 979 $computerdb->{$ip}{switch_hostname} || $computerdb->{$ip}{switch_description}, 979 980 $computerdb->{$ip}{switch_port}, … … 1569 1570 for my $sw (sort keys %db_switch_output_port) { 1570 1571 if (exists $db_switch_parent{$sw}) { 1571 printf "%-2 5s %2s +--> %2s %-25s\n", $sw, $db_switch_output_port{$sw}, $db_switch_parent{$sw}->{port}, $db_switch_parent{$sw}->{switch};1572 printf "%-27s %2s +--> %2s %-25s\n", $sw, $db_switch_output_port{$sw}, $db_switch_parent{$sw}->{port}, $db_switch_parent{$sw}->{switch}; 1572 1573 } 1573 1574 else { 1574 printf "%-2 5s %2s +--> router\n", $sw, $db_switch_output_port{$sw};1575 printf "%-27s %2s +--> router\n", $sw, $db_switch_output_port{$sw}; 1575 1576 } 1576 1577 } … … 1583 1584 for my $sw (keys %{$db_switch_connected_on_port{$swport}}) { 1584 1585 if (exists $db_switch_output_port{$sw}) { 1585 printf "%-2 5s %2s <--+ %2s %-25s\n", $sw_connect, $port_connect, $db_switch_output_port{$sw}, $sw;1586 printf "%-27s %2s <--+ %2s %-25s\n", $sw_connect, $port_connect, $db_switch_output_port{$sw}, $sw; 1586 1587 } 1587 1588 else { 1588 printf "%-2 5s %2s <--+ %-25s\n", $sw_connect, $port_connect, $sw;1589 printf "%-27s %2s <--+ %-25s\n", $sw_connect, $port_connect, $sw; 1589 1590 } 1590 1591 } … … 1637 1638 for my $sw (sort keys %db_switch_output_port) { 1638 1639 if (exists $db_switch_parent{$sw}) { 1639 printf "%-2 5s %2s +--> %2s %-25s\n", $sw, $db_switch_output_port{$sw}, $db_switch_parent{$sw}->{port}, $db_switch_parent{$sw}->{switch};1640 printf "%-27s %2s +--> %2s %-25s\n", $sw, $db_switch_output_port{$sw}, $db_switch_parent{$sw}->{port}, $db_switch_parent{$sw}->{switch}; 1640 1641 } 1641 1642 else { 1642 printf "%-2 5s %2s +--> router\n", $sw, $db_switch_output_port{$sw};1643 printf "%-27s %2s +--> router\n", $sw, $db_switch_output_port{$sw}; 1643 1644 } 1644 1645 } … … 1651 1652 for my $sw (keys %{$db_switch_connected_on_port{$swport}}) { 1652 1653 if (exists $db_switch_output_port{$sw}) { 1653 printf "%-2 5s %2s <--+ %2s %-25s\n", $sw_connect, $port_connect, $db_switch_output_port{$sw}, $sw;1654 printf "%-27s %2s <--+ %2s %-25s\n", $sw_connect, $port_connect, $db_switch_output_port{$sw}, $sw; 1654 1655 } 1655 1656 else { 1656 printf "%-2 5s %2s <--+ %-25s\n", $sw_connect, $port_connect, $sw;1657 printf "%-27s %2s <--+ %-25s\n", $sw_connect, $port_connect, $sw; 1657 1658 } 1658 1659 }
Note: See TracChangeset
for help on using the changeset viewer.