Real-time monitoring of ifstat and Iftop network traffic

Source: Internet
Author: User



Ifstat



The system comes with the network Interface Traffic detection tool, relatively simple



[Email protected] ~]# ifstat-a



#16202.1804289383 sampling_interval=1 time_const=60



Interface Rx pkts/rate TX pkts/rate Rx data/rate TX data/rate



Rx Errs/drop TX errs/drop Rx over/rate TX coll/rate



Lo 52055 0 52055 0 2636K 0 2636K 0



0 0 0 0 0 0 0 0



Em1 92453K 0 89118K 0 3677M 0 3738M 0



0 0 0 0 0 0 0 0



EM2 0 0 0 0 0 0 0 0



0 0 0 0 0 0 0 0


    • Rx Pkts/rate Packet Receive traffic

    • RX Errs/drop Packet Loss

    • TX pkts/rate Packet Send traffic

    • Rx Data/rate Data Receive traffic

    • TX data/rate Data Send traffic





Iftop



Ability to detect traffic in real time, monitor TCP/IP connection, etc. without reporting function



Must be root to run



System is not self-brought, yum-y install Iftop can be installed



Iftop-iem1


       19.1Mb            38.1Mb              57.2Mb               76.3Mb             95.4Mb +-----------------+-----------------+--------------------+--------------------+---------------------192.168.1.11                                  => 192.168.1.66                5.3Mb  3.22Mb  3.20Mb                                                  <=                        219kb  45.7kb  49.3kb
192.168.1.11                                   => 192.168.1.29             144kb  30.8kb  29.6kb                                                      <=                               11.3Mb  2.38Mb  2.74Mb
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   932b 
                                               <=                               1.31kb  1.05kb   893b
192.168.1.11                                   => 192.168.2.78                 2.53kb  1.54kb  2.15kb                                                <=                              160b    160b    187b
192.168.1.11                                   => 111.126.195.69               0b    166b     69b                                                    <=                              0b      0b      0b 
------------------------------------------------------------------------------------------------------TX:             cum:   9.70MB   peak:   15.6Mb                         rates:   15.4Mb  3.26Mb  3.23Mb
RX:                    8.38MB           14.9Mb                                  11.5Mb  2.42Mb  2.79Mb
TOTAL:                 18.1MB           30.5Mb                                  27.0Mb  5.69Mb  6.03Mb


First line: Broadband display



Middle section: List of external connections, that is, what IP is logged and the network connection to this computer



Middle part right: The real-time parameters are the average traffic for the IP connected to the native 2,10,40 seconds.



= = sends the data; <= represents the Received data



Bottom three lines: Send, receive and all network traffic on behalf of



Bottom three row second column: for running iftop to current traffic



Bottom three row third column: for peak value



Bottom three row fourth column: average of 2,10,40 seconds






Through the Iftop interface display results are easy to find which IP in the occupied network traffic, this is ifstat do not, but the Iftop traffic display unit is bit, is the bits.






Iftop-h Display Help



Iftop-n display the IP or hostname of this machine



Iftop-s toggles whether to display host information for remote destination hosts



IFTOP-T Toggle display format is 2 lines/1 lines/only sent traffic/only the received traffic is displayed



Iftop-n Display port number or port service name



Iftop-s toggles whether to display port information for this machine



Iftop-d toggles whether to display port information for remote destination host



Press P: Toggle whether port information is displayed



Press P: Toggle Pause/Resume Display



Press B: Toggles whether the average flow graph bar is displayed



Press B: Switch to calculate the average flow in 2,10,40 seconds



Press T: Toggles whether the total traffic for each connection is displayed



Press L: Turn on the screen filtering function, enter the characters to filter, such as IP, press ENTER, you can only display this IP-related traffic information



Press L: Toggle the top of the display screen, the scale is different, the flow graph bar will change



Press J or K: you can scroll up or down to display the connection record






Press 1 or 2 or 3: You can sort by the three-column flow data displayed on the right



Press <: Sort by the local name and IP on the left



: Sort by hostname or IP of the remote destination host






Press O: Toggle whether the current connection is only displayed



Press f: Edit filter code, rarely used



By! : You can use shell commands and seldom use



Q: Exit monitoring



Real-time monitoring of ifstat and Iftop network traffic


Contact Us

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

  • 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.