- Timestamp:
- Oct 31, 2017, 11:59:46 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r322 r323 1669 1669 my $computerdb = computerdb_load(); 1670 1670 1671 #printf "%-28s %8s %-40s %-15s %-18s %-16s %s\n", qw(Switch Port Hostname-FQ IPv4-Address MAC-Address Date VLAN);1672 #print "--------------------------------------------------------------------------------------------------------------------------------------------\n";1673 1671 my $tb_computer = Text::Table->new( 1674 1672 {align => 'left', align_title => 'left', title => 'Switch'}, … … 1709 1707 $vlan, 1710 1708 ); 1711 # printf "%-28s %8s %12s %-40s %-15s %-18s %-16s %s\n",1712 # $computerdb->{$ip}{'switch_hostname'} || $computerdb->{$ip}{'switch_description'},1713 # $computerdb->{$ip}{'switch_port_hr'},1714 # $arrow,1715 # $computerdb->{$ip}{'hostname_fq'},1716 # $ip,1717 # $computerdb->{$ip}{'mac_address'},1718 # $date,1719 # $vlan;1720 1709 } 1721 1710 … … 2080 2069 {align => 'right', align_title => 'right', title => 'Port'}, 2081 2070 {is_sep => 1, title => ' ', body => ' !'}, 2082 {align => 'left', align_title => 'left', title => 'VLAN _Bad'},2071 {align => 'left', align_title => 'left', title => 'VLAN-Bad'}, 2083 2072 {is_sep => 1, title => ' ', body => ' +-> '}, 2084 {align => 'left', align_title => 'left', title => 'VLAN _Good'},2073 {align => 'left', align_title => 'left', title => 'VLAN-Good'}, 2085 2074 {is_sep => 1, title => ' ', body => ' '}, 2086 {align => 'left', align_title => 'left', title => 'VLAN _ID'},2075 {align => 'left', align_title => 'left', title => 'VLAN-ID'}, 2087 2076 {is_sep => 1, title => ' ', body => ' '}, 2088 {align => 'left', align_title => 'left', title => 'Date _Last'},2089 {is_sep => 1, title => ' ', body => ' '},2090 {align => 'left', align_title => 'left', title => 'Date _Good'},2091 {is_sep => 1, title => ' ', body => ' '},2077 {align => 'left', align_title => 'left', title => 'Date-Last'}, 2078 {is_sep => 1, title => ' ', body => ' '}, 2079 {align => 'left', align_title => 'left', title => 'Date-Good'}, 2080 {is_sep => 1, title => ' ', body => ' '}, 2092 2081 {align => 'left', align_title => 'left', title => 'MAC-Address'}, 2093 2082 {is_sep => 1, title => ' ', body => ' '}, … … 2139 2128 $computerdb->{$src_ip}{'hostname_fq'}, 2140 2129 ); 2141 2142 # printf "%s / %-10s +-> %-10s(%i) %s %s %s %s\n",2143 # $swpt, $switchportdb{$swpt}->{'vlan'}, $computerdb->{$src_ip}{'network'}, $vlan_id,2144 # $date,2145 # $src_date,2146 # $computerdb->{$src_ip}{'mac_address'},2147 # $computerdb->{$src_ip}{'hostname_fq'};2148 2130 } 2149 2131 print $tb_bad->title(); … … 2929 2911 # Switch output port and parent port connection 2930 2912 my $tb_child = Text::Table->new( # http://www.perlmonks.org/?node_id=988320 2931 {align => 'left', align_title => 'left', title => 'Child _Switch'},2932 {align => 'right', align_title => 'right', title => 'Output _Port'},2913 {align => 'left', align_title => 'left', title => 'Child-Switch'}, 2914 {align => 'right', align_title => 'right', title => 'Output-Port'}, 2933 2915 {align => 'center', align_title => 'center', title => 'Link'}, 2934 {align => 'left', align_title => 'left', title => 'Input _Port'},2935 {align => 'left', align_title => 'left', title => 'Parent _Switch'},2916 {align => 'left', align_title => 'left', title => 'Input-Port'}, 2917 {align => 'left', align_title => 'left', title => 'Parent-Switch'}, 2936 2918 ); 2937 2919 for my $sw (sort keys %db_switch_output_port) { … … 2956 2938 print "\n"; 2957 2939 my $tb_parent = Text::Table->new( # http://www.perlmonks.org/?node_id=988320 2958 {align => 'left', align_title => 'left', title => 'Parent _Switch'},2959 {align => 'right', align_title => 'right', title => 'Input _Port'},2940 {align => 'left', align_title => 'left', title => 'Parent-Switch'}, 2941 {align => 'right', align_title => 'right', title => 'Input-Port'}, 2960 2942 {align => 'center', align_title => 'center', title => 'Link'}, 2961 {align => 'left', align_title => 'left', title => 'Output _Port'},2962 {align => 'left', align_title => 'left', title => 'Child _Switch'},2943 {align => 'left', align_title => 'left', title => 'Output-Port'}, 2944 {align => 'left', align_title => 'left', title => 'Child-Switch'}, 2963 2945 ); 2964 2946 for my $swport (sort keys %db_switch_connected_on_port) {
Note: See TracChangeset
for help on using the changeset viewer.