Network traffic monitoring for Linux machines can be done using iftop
Installation method
Under the CentOS system
1. Install the necessary packages
yum install libpcap libpcap-devel ncurses ncurses-devel
2. Download and install Iftop
1.0pre4
Version is the latest version to February 9, 2017.
cd /tmpwget http://www.ex-parrot.com/pdw/iftop/download/iftop-1.0pre4.tar.gztar -zxvf iftop-1.0pre4.tar.gzcd iftop-1.0pre4./configuremakemake install
How to use
Iftop
Start iftop directly, my server listens to EM1 network port by default.
Iftop-i Em3-n
Monitor network card EM3, directly display IP.
Running results paste_image.png Common parameters
Press H to view help after entering Iftop.
Host Display:
N-Toggle DNS resolution, display IP or hostname
S-Toggle Show/Hide Native host information
D-Toggle Show/Hide the host information for remote hosts
T-one-line display mode (default is two lines)
Port Display:
N-Toggle Open/Close Port service parsing
S-Toggle Show/Hide Original host port
D-Toggle Show/Hide remote host port
P-Toggle Show/Hide port information
Sorting:
1/2/3-Press 1 or 2 or 3 to sort by the three-column flow data displayed on the right
<-Sort by original hostname >-Sort by remote host name
O-Fixed display only the current connection
General:
P-Pause/start
H-Toggle Display Help
B-Toggle display of the flow bar
B-Switch calculates the average flow in 2 seconds or 10 seconds or 40 seconds
T-Toggles whether the total traffic for each connection is displayed
J/K-Scroll up/down display
L-Toggle Flow bar scaling (linear scale and logarithmic scales)
Meidisun
Links: https://www.jianshu.com/p/077ba47a10a8
Source: Pinterest
The copyright of the book is owned by the author, and any form of reprint should be contacted by the author for authorization and attribution.
Linux View intranet Traffic