Difference between revisions of "formatted netstat -i output"

From thelinuxwiki
Jump to: navigation, search
Line 1: Line 1:
 
ugly command, nice output
 
ugly command, nice output
 
  netstat -i | awk '{printf "%-10s%-8s%-4s%-12s%-12s%-12s%-12s%-12s%-12s%-12s%-12s%-12s\n",$1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12}'
 
  netstat -i | awk '{printf "%-10s%-8s%-4s%-12s%-12s%-12s%-12s%-12s%-12s%-12s%-12s%-12s\n",$1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12}'
 
 
  Kernel    Interfacetable                                                                                                             
 
  Kernel    Interfacetable                                                                                                             
 
  Iface    MTU    Met RX-OK      RX-ERR      RX-DRP      RX-OVR      TX-OK      TX-ERR      TX-DRP      TX-OVR      Flg         
 
  Iface    MTU    Met RX-OK      RX-ERR      RX-DRP      RX-OVR      TX-OK      TX-ERR      TX-DRP      TX-OVR      Flg         

Revision as of 03:52, 2 August 2013

ugly command, nice output

netstat -i | awk '{printf "%-10s%-8s%-4s%-12s%-12s%-12s%-12s%-12s%-12s%-12s%-12s%-12s\n",$1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12}'
Kernel    Interfacetable                                                                                                            
Iface     MTU     Met RX-OK       RX-ERR      RX-DRP      RX-OVR      TX-OK       TX-ERR      TX-DRP      TX-OVR      Flg         
Mgmt      1500    0   42972148    0           0           0           33031384    0           0           0           BMRU        
Sync      1500    0   1437259126  0           26123       0           2901286795  0           0           0           BMRU        
eth1-01   1500    0   3233895885  2214590     104401      104401      3882612740  0           0           0           BMRU        
eth1-02   1500    0   2452483619  0           10073       10073       224938863   0           0           0           BMRU        
eth1-03   1500    0   47909283    0           0           0           48619886    0           0           0           BMRU        
eth1-04   1500    0   2121393793  0           0           0           1424110895  0           0           0           BMRU        
eth1-06   1500    0   3075729697  0           0           0           2825892631  0           0           0           BMRU        
eth1-07   1500    0   2083045577  0           2642073     2642073     3603188807  0           0           0           BMRU        
eth1-07:0 1500    0   0           0           0           0           0           0           0           0           BMRU        
eth1-08   1500    0   72183182    0           0           0           47803770    0           0           0           BMRU        
eth2-01   1500    0   25896575    0           0           0           26463789    0           0           0           BMRU        
lo        16436   0   265912531   0           0           0           265912531   0           0           0           LRU