Linux - network monitor (iftop)

iftop does for network usage what top does for CPU usage. It listens to network traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts. Handy for answering the question "why is our ADSL link so slow?".

查看ppp0網路介面的即時流量:
$ iftop -i ppp0

以位元組(bytes)為單位顯示流量(預設是位元bits):
$ iftop -B

直接顯示IP, 不進行DNS反解:
$ iftop -n

直接顯示連接埠編號, 不顯示服務名稱:
$ iftop -N

其他參數可下 iftop -h 看說明.

進入iftop畫面時, 可按 p 切換是否顯示連接埠, n 切換顯示IP或主機的domain name, N切換顯示連接埠代號或名稱, p暫停顯示, b切換是否顯示長條, B切換計算幾秒內的平均流量, 其他按鍵可以按h觀看說明.

設定檔的位置在~/.iftoprc , 關於設定檔的寫法可以參考 iftop 的 info page.

Comments