- Timestamp:
- Oct 31, 2017, 11:34:47 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r320 r321 2074 2074 } 2075 2075 2076 # swL2-legi-1.hmg.priv Gi1/0/3 / legi-calcul +-> legi-683 (337) 2017-10-31/10:30 2017-09-08/11:02 78:24:AF:88:69:64 meige8pcsv149.legi.grenoble-inp.fr 2077 my $tb_bad = Text::Table->new( 2078 {align => 'left', align_title => 'left', title => 'Switch'}, 2079 {is_sep => 1, title => ' ', body => ' '}, 2080 {align => 'right', align_title => 'right', title => 'Port'}, 2081 {is_sep => 1, title => ' ', body => ' !'}, 2082 {align => 'left', align_title => 'left', title => 'VLAN_Bad'}, 2083 {is_sep => 1, title => ' ', body => ' +-> '}, 2084 {align => 'left', align_title => 'left', title => 'VLAN_Name'}, 2085 {is_sep => 1, title => ' ', body => ' ('}, 2086 {align => 'left', align_title => 'left', title => 'VLAN_Number'}, 2087 {is_sep => 1, title => ' ', body => ') '}, 2088 {align => 'left', align_title => 'left', title => 'Date_Float'}, 2089 {is_sep => 1, title => ' ', body => ' '}, 2090 {align => 'left', align_title => 'left', title => 'Date_Good'}, 2091 {is_sep => 1, title => ' ', body => ' '}, 2092 {align => 'left', align_title => 'left', title => 'MAC-Address'}, 2093 {is_sep => 1, title => ' ', body => ' '}, 2094 {align => 'left', align_title => 'left', title => 'Hostname-FQ'}, 2095 ); 2096 2076 2097 LOOP_ON_RECENT_COMPUTER: 2077 2098 for my $swpt (keys %switchportdb) { … … 2106 2127 2107 2128 my $vlan_id = get_current_vlan_id($computerdb->{$src_ip}{'network'}); 2108 2109 printf "%s / %-10s +-> %-10s(%i) %s %s %s %s\n", 2110 $swpt, $switchportdb{$swpt}->{'vlan'}, $computerdb->{$src_ip}{'network'}, $vlan_id, 2129 my ($switch_hostname, $port_hr) = split /\s+/, $swpt, 2; 2130 $tb_bad->add( 2131 $switch_hostname, 2132 $port_hr, 2133 $switchportdb{$swpt}->{'vlan'}, 2134 $computerdb->{$src_ip}{'network'}, 2135 $vlan_id, 2111 2136 $date, 2112 2137 $src_date, 2113 2138 $computerdb->{$src_ip}{'mac_address'}, 2114 2139 $computerdb->{$src_ip}{'hostname_fq'}; 2115 } 2140 ); 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 } 2149 print $tb_bad->body(); 2116 2150 } 2117 2151
Note: See TracChangeset
for help on using the changeset viewer.