In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to quickly get started with Iftop commands in linux, which is very detailed and has certain reference value. Friends who are interested must finish reading it!
The basic usage of Iftop
Run the iftop command without any parameters to view the bandwidth usage of the default interface, as shown in the screenshot below.
$sudo iftop
An example of the output of the iftop command shows the bandwidth of the default interface, as shown below.
Real-time monitoring of Linux network bandwidth
Real-time monitoring of Linux network bandwidth
Parameters commonly used in Iftop parameters
-I set the network card for monitoring, such as # iftop-I eth2
-B displays traffic in bytes (default is bits), such as # iftop-B
-n causes host information to display IP directly by default, such as # iftop-n
-N causes port information to display port number directly by default, such as # iftop-N
-F shows the inbound and outbound traffic of a specific network segment, such as # iftop-F 10.10.1.0 Universe 24 or # iftop-F 10.10.1.0 Universe 255.255.255.0
-h (display this message), help, display parameter information
-p after using this parameter, the list in the middle shows the local host information and IP information other than the local host appears.
-b to make the traffic graph bar display by default
-f this is not very good at using for the time being, it is used to filter and calculate packets.
-P makes host information and port information display by default
-m sets the maximum value of the scale at the top of the interface, which is displayed in five segments, for example: # iftop-m 100m
Some operation commands after entering the iftop screen (pay attention to case)
Press h to toggle whether to display help
Press n to toggle to display the IP or hostname of this machine
Press s to switch whether to display the host information of this computer.
Press d to toggle whether to display the host information of the remote target host
Toggle the display format by t to 2 lines / 1 lines / only send traffic / only received traffic
Press N to toggle to display the port number or port service name
Press S to toggle whether to display the port information of this machine.
Press D to toggle whether to display the port information of the remote target host
Press p to toggle whether to display port information
Press P to toggle pause / resume display
Press b to toggle whether to display the average flow graph bar
Calculate the average traffic within 2 seconds or 10 seconds or 40 seconds by B switch
Press T to toggle whether to display the total traffic for each connection
Press l to open the screen filtering function, and enter the characters to be filtered, such as ip. After pressing enter, the screen will only display the traffic information related to this IP.
Press L to switch the scale on the display screen; if the scale is different, the flow graph bar will change
Press j or k to scroll up or down the connection record displayed on the screen
Press 1 or 2 or 3 to sort according to the three columns of traffic data displayed on the right
Press
Press > to sort by the hostname or IP of the remote destination host
Press o to toggle whether to display only the current connection
Press f to edit the filter code, this is a translated statement, I have not used this!
Press! You can use the shell command, this is not used! I don't understand what orders work here!
Press Q to exit the monitoring.
Monitoring Linux network interface
First run the following ifconfig command or ip command to find all connected network interfaces on the Linux system.
$sudo ifconfigOR$ sudo ip addr show
Then use the-I flag to specify the interface to monitor. For example, the following command is used to monitor the bandwidth on the wireless interface on the test computer.
$sudo iftop-I wlp2s0 monitors Linux Wifi network bandwidth
Monitor Linux Wifi network bandwidth
To disable hostname lookup, use the-n flag.
$sudo iftop-n eth0
To turn on the port display, use the-P switch.
$sudo iftop-P eth0Iftop options and usage
When running iftop, you can use keys such as S, D to view more information, such as source, destination, and so on. If you want to explore more options and techniques, run iftop. Press "Q" to exit the running window.
The above is all the contents of the article "how to get started with Iftop commands in linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.