Ubuntu speed limit and Linux traffic monitoring tool iftop usage introduction, traffic monitoring iftop
Install wondershaper first:
# Apt-get install wondershaper
Maximum and uplink bandwidth (unit: Kb ):
# Wondershaper eth0 2000 240 (download limit: 200 K, upload 24 K)
// Wondershaper eth0 500 120
Unlimitedly:
# Wondershaper clear eth0
.////////////////
What is iftop?
Iftop is a real-time traffic monitoring tool similar to top.
Official Website: https://www.ex-parrot.com /~ Pdw/iftop/
Ii. What is the use of iftop?
Iftop can be used to monitor the network card's real-time traffic (network segment can be specified), reverse resolution IP address, display port information, and so on. The detailed description will be described in the following parameters.
3. Install iftop
Installation Method 1. Compile and install
If compilation and installation are used, you can download the latest source code package from the iftop official website.
Before installation, you must have installed the environment required for basic compilation, such as make, gcc, and autoconf. To install iftop, you also need to install libpcap and libcurses.
Install the required dependency package on CentOS:
Yum install flex byacc libpcap ncurses-devel libpcap-devel
Install the required dependency package on Debian:
Apt-get install flex byacc libpcap0.8 libncurses5
Download 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
Installation Method 2: (lazy method, simplest)
Skip the preceding steps.
Press confirm install iftop
Run the Debian system: apt-get install iftop
4. Run iftop
Run: iftop
The effect is as follows:
V. Related Parameters and descriptions
1. Description of iftop Interface
The scale range shown on the page is similar to the scale range of the scale. It is used as a scale for the long strips displaying traffic graphs.
The left and right arrows in the middle indicate the direction of traffic.
TX: Send traffic
RX: receive traffic
TOTAL: TOTAL traffic
Cumm: total traffic from running iftop to current time
Peak: traffic peak
Rates: average traffic in the past 2 s, 10 s, and 40 s respectively