Linux Traffic Monitoring Tool Usage summary-iftop allows you to use top in Unix-like systems to view system resources, processes, memory usage, and other information. To view the network status, you can use tools such as netstat and nmap. To view real-time network traffic and monitor TCPIP connections, you can use iftop. Linux Traffic Monitoring Tool Usage summary-iftop allows you to use top in Unix-like systems to view system resources, processes, memory usage, and other information. To view the network status, you can use tools such as netstat and nmap. To view real-time network traffic and monitor TCP/IP connections, you can use iftop. I. What is iftop? Iftop is a real-time traffic monitoring tool similar to top. 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. 1. Compile and install the latest source code package on 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 download iftop wget http://www.ex-parrot.com/pdw/iftop/download/iftop-1.0pre2.tar.gz Tar zxvfiftop-1.0pre2.tar.gz cdiftop-1.0pre2 installation. /configure make & make install 4. run iftop 2. common parameters related to iftop are monitored by default. iftop monitors the traffic of the first Nic. iftop monitors eth1 iftop-I eth1 to directly display IP addresses, if DNS anti-resolution is not performed, iftop-n directly displays the connection port number and the service name: iftop-N displays the inbound and outbound traffic of a network segment. iftop-F 192.168.1.0/24 or 192.168.1.0/255.255.255.0-I sets the monitored network adapter, for example: # iftop-I eth1-B displays traffic in bytes (bits by default). For example, # iftop-B-n displays IP addresses by default. for example: # iftop-n-N indicates that port information is directly displayed by default, for example, # iftop-N-F indicates the port number. Determine inbound and outbound traffic of the network segment, for example, # iftop-F 10.10.1.0/24 or # iftop-F 10.10.1.0/255.255.255.0-h (display this message, show parameter information-p after using this parameter, the local host information is displayed in the list in the middle, and IP information other than the local host is displayed.-B displays the traffic graph by default; -f is not very useful for the moment. filter the calculation package.-P displays host information and port information by default.-m sets the maximum scale on the top of the interface, the scale is displayed in five sections, for example: # iftop-m 100 M run iftop-N-n-I eth1 and the page is 19.1 Mb 38.1 Mb 57.2 Mb 76.3 Mb + ------------------- + ----------------- + -------------------- + accept + -------------- ------- 192.168.1.11 => 192.168.1.66 5.3 Mb 3.22 Mb 3.20 Mb <= 219kb 45.7kb 49.3kb 192.168.1.11 => 192.168.1.29 144kb 255.mask <= 11.3 Mb 2.38 Mb 2.74 Mb 192.168.1.11 => 12.2.11.71 0b 6.40kb 6.66kb <= 0b 0b 0b 192.168.1.11 => 192.168.1.8 2.63kb 1.43kb 255.< = 1.31kb 1.05kb 893b 192.168.1.11 => 192.168.2.78 255.255.255.255.255.255.0b 160b 187b 192.168.1.11 => 255.0b 166b 69b <= 0b 0b Listen TX: cum: 9.70 MB peak: 15.6 Mb rates: 15.4 Mb 3.26 Mb 3.23 Mb RX: 8.38 MB 14.9 Mb 11.5 Mb 2.42 Mb TOTAL: 18.1 MB 30.5 Mb 27.0 Mb 5.69 Mb 6.03 Mb iftop interface meaning: the first line: bandwidth display intermediate part: external connection list, that is, the right side of the network connection between the ip address and the local machine is recorded: the real-time parameter is that the access ip address is connected to the local machine for 2 seconds, the average traffic of 10 s and 40 s => indicates the data to be sent. <= indicates three rows at the bottom of the received data: sending, receiving, and all traffic. The second column is at the bottom of the three rows: run iftop for you to the current traffic bottom three rows third column: high At the bottom of the peak, the third row and the fourth column are average TX: send traffic RX: receive traffic TOTAL: TOTAL traffic Cumm: TOTAL traffic running iftop to the current time peak: traffic peak rates: it indicates that the average traffic of the past 2 s, 10 s, and 40 s is easily located on the iftop interface, which occupies network traffic. this is not what ifstat can do. However, the traffic Display Unit of iftop is Mb. The B is bit, bit, not byte, and the KB of ifstat. The B is byte, and the byte is eight times the bit. Beginners are easily misled. Some Operation Commands (case-sensitive) that enter the iftop screen are switched by h to show help. The IP address or host name of the local machine is displayed by n; switch by s to check whether the host information of the local machine is displayed; switch by d to check whether the host information of the remote target host is displayed; the display format of switch by t is 2 rows/1 line/display only sent traffic/display only received traffic; switch by N display port number or port service name; switch by S to check whether the local port information is displayed; switch by D to check whether port information of the remote target host is displayed; switch by p to check whether port information is displayed; switch by P to pause/continue to display; whether to display the average traffic graph bar by B switching; calculate the average traffic of 2 seconds, 10 seconds, or 40 seconds based on B switching; whether to display the total traffic of each connection by T switching; enable the screen filtering function by pressing l. enter the characters to be filtered, such as ip address. press enter to display only traffic information related to this IP address. then, switch the scale above the display screen by pressing L; different scales change the traffic graph bar. you can scroll up or down the connection records displayed on the screen by j or k; sort by 1, 2, or 3 based on the three columns of traffic data displayed on the right. <根据左边的本机名或ip排序; 按> Sort by the host name or IP address of the remote target host; whether o-based switching is fixed or not only displays the current connection; you can edit and filter the code by f, which is translated and I have never used this! Press! You can use shell commands. this is useless! I don't understand what the command works here! Press q to exit monitoring.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service