Difference between revisions of "formatted netstat -i output"
From thelinuxwiki
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 | ||
Line 15: | Line 15: | ||
eth2-01 1500 0 25896575 0 0 0 26463789 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 | lo 16436 0 265912531 0 0 0 265912531 0 0 0 LRU | ||
+ | |||
+ | regular, unformatted command... | ||
+ | |||
+ | # '''netstat -i''' | ||
+ | Kernel Interface table | ||
+ | Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg | ||
+ | Mgmt 1500 0 42971857 0 0 0 33031217 0 0 0 BMRU | ||
+ | Sync 1500 0 1437253374 0 26123 0 2901278387 0 0 0 BMRU | ||
+ | eth1-01 1500 0 3233824068 2214586 104401 104401 3882515746 0 0 0 BMRU | ||
+ | eth1-02 1500 0 2452468224 0 10073 10073 224918415 0 0 0 BMRU | ||
+ | eth1-03 1500 0 47909107 0 0 0 48619706 0 0 0 BMRU | ||
+ | eth1-04 1500 0 2121384593 0 0 0 1424105000 0 0 0 BMRU | ||
+ | eth1-06 1500 0 3075678521 0 0 0 2825847210 0 0 0 BMRU | ||
+ | eth1-07 1500 0 2082965114 0 2642073 2642073 3603131206 0 0 0 BMRU | ||
+ | eth1-07:0 1500 0 0 0 0 0 0 0 0 0 BMRU | ||
+ | eth1-08 1500 0 72183010 0 0 0 47803595 0 0 0 BMRU | ||
+ | eth2-01 1500 0 25896410 0 0 0 26463622 0 0 0 BMRU | ||
+ | lo 16436 0 265912189 0 0 0 265912189 0 0 0 LRU | ||
+ | |||
+ | [[category:monitoring]] |
Revision as of 03:53, 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
regular, unformatted command...
# netstat -i Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg Mgmt 1500 0 42971857 0 0 0 33031217 0 0 0 BMRU Sync 1500 0 1437253374 0 26123 0 2901278387 0 0 0 BMRU eth1-01 1500 0 3233824068 2214586 104401 104401 3882515746 0 0 0 BMRU eth1-02 1500 0 2452468224 0 10073 10073 224918415 0 0 0 BMRU eth1-03 1500 0 47909107 0 0 0 48619706 0 0 0 BMRU eth1-04 1500 0 2121384593 0 0 0 1424105000 0 0 0 BMRU eth1-06 1500 0 3075678521 0 0 0 2825847210 0 0 0 BMRU eth1-07 1500 0 2082965114 0 2642073 2642073 3603131206 0 0 0 BMRU eth1-07:0 1500 0 0 0 0 0 0 0 0 0 BMRU eth1-08 1500 0 72183010 0 0 0 47803595 0 0 0 BMRU eth2-01 1500 0 25896410 0 0 0 26463622 0 0 0 BMRU lo 16436 0 265912189 0 0 0 265912189 0 0 0 LRU