Linux View network card Traffic tool has Iptraf, iftop and Nethogs, etc., iftop can be used to monitor the network card real-time traffic (can specify network segment), reverse resolution IP, display port information.
The command to install Iftop is as follows:
The CentOS system is "Yum install Iftop-y"
Debian/ubuntu system for "Apt-get install Iftop"
Common parameter Description:
-I set the monitoring network card, such as: # Iftop-i eth1, where eth1 is the server's public network card, (network card name can be viewed through ifconfig), the results such as one or two:
-B displays traffic in bytes (default is bits), such as: # Iftop-b
-F shows incoming and outgoing traffic for a specific segment, such as # iftop-f 182.92.***.0/24 or # iftop-f 182.92.***.0/255.255.255.0
such as: Iftop-i Eth1-b-F 182.92.***.20
Displays the amount of data 182.92.***.20 this IP is interacting with the server's Nic eth1, in bytes.
Interface Description:
"<=" and "=" represent the direction of traffic
"TX": Traffic sent from the NIC
"RX": Network card receives traffic
"Total": Network card sent to receive the overall traffic
"Cum": Iftop start running to the current point in time total traffic
Peak: Network card traffic spikes
"Rates": Indicates the average current of 2s, 10s, 40s, respectively
You can exit iftop with the "Q" Key of the keyboard
Linux view real-time bandwidth traffic conditions