Script _ real-time display of data traffic on the network card eth0

! # bin / bash
# Function: infinite loop, real-time display of data packet traffic card eth0 sent
# Author: liusingbon
the while:
do
       echo "local LAN traffic information eth0 as follows:"
       ifconfig eth0 | grep "RX Pack" | awk 'Print $ {}. 5'
       the ifconfig eth0 | grep "the TX Pack" | awk '{}. 5 Print $'
       SLEEP. 1
DONE

Guess you like

Origin www.cnblogs.com/liusingbon/p/11032624.html