ubuntu 限速和Linux流量監控工具iftop使用介紹,流量監控iftop

來源:互聯網
上載者:User

ubuntu 限速和Linux流量監控工具iftop使用介紹,流量監控iftop

先安裝wondershaper:

# apt-get install wondershaper

限制下、上行頻寬(單位Kb):

# wondershaper eth0 2000 240 (下載限制為200K,上傳24K)

//wondershaper eth0 500 120

取消限制:

# wondershaper clear eth0

.////////////////

iftop是什麼?

iftop是類似於top的即時資料流量監控工具。

官方網站:https://www.ex-parrot.com/~pdw/iftop/

二、iftop有什麼用?

iftop可以用來監控網卡的即時資料流量(可以指定網段)、反向解析IP、顯示連接埠資訊等,詳細的將會在後面的使用參數中說明。

三、安裝iftop

安裝方法1、編譯安裝

如果採用編譯安裝可以到iftop官網下載最新的源碼包。

安裝前需要已經安裝好基本的編譯所需的環境,比如make、gcc、autoconf等。安裝iftop還需要安裝libpcap和libcurses。

CentOS上安裝所需依賴包:

yum install flex byacc libpcap ncurses ncurses-devel libpcap-devel

Debian上安裝所需依賴包:

apt-get install flex byacc libpcap0.8 libncurses5

下載iftop

wget https://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

安裝方法2:(懶人辦法,最簡單)

直接省略上面的步驟

按https://www.vpser.net/manage/centos-rhel-linux-third-party-source-epel.html這個教程安裝好EPEL,直接yum install iftop

Debian系統 運行:apt-get install iftop

四、運行iftop

直接運行: iftop

效果如:

 

 

五、相關參數及說明

1、iftop介面相關說明

介面上面顯示的是類似刻度尺的刻度範圍,為顯示流量圖形的長條作尺規用的。

中間的<= =>這兩個左右箭頭,表示的是流量的方向。

TX:發送流量

RX:接收流量

TOTAL:總流量

Cumm:運行iftop到目前時間的總流量

peak:流量峰值

rates:分別表示過去 2s 10s 40s 的平均流量

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.