[Linux] Linux 流量監測工具 - iftop
Ref: https://www.tecmint.com/iftop-linux-network-bandwidth-monitoring-tool/ https://www.adamfei.com/iftop-linux-traffic-monitoring-tool-most-comprehensive-iftop-tutorial/ https://blog.gtwang.org/linux/iftop-linux-network-traffic-monitor/ 不得不說 iftop 真的非常好用 安裝 # 在CentOS/RedHat中需要安裝epel-release yum install epel-release yum install iftop apt-get install iftop # 假設系統太老舊無法使用yum/apt安裝的話可以自己編譯 yum install flex byacc libpcap ncurses ncurses-devel libpcap-devel # Debian系列的使用以下 apt-get install flex byacc libpcap0.8 libncurses5 wget http://www.ex-parrot.com/pdw/iftop/download/iftop-0.17.tar.gz tar zxvf iftop-0.17.tar.gz cd iftop-0.17 ./configure make && make install 常用方法: # 把 ip, port 都顯示出來 iftop -P # 指定網卡, 如果一開始使用iftop會跑出 # pcap_open_live That device is not up 這種訊息 # 就可以使用指定網卡這招 iftop -i eth0 TX:發送流量 RX:接收流量 TOTAL:總流量 Cumm:執行 iftop 到目前時間的總流量 peak:流量峰值 rates:分別表示過去 2s 10s 40s 的平均流量 常用的參數 -i 設定監測的網卡,如:# iftop -i eth1 -B 以 bytes 為單位顯示流量(預設是 bits),如:# iftop -...