Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the Linux iftop command

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "how to use the Linux iftop command". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Linux common command iftop command is a real-time traffic monitoring tool, monitoring TCP/IP connections, etc., the disadvantage is that there is no report function. You must be root to run.

Iftop is a real-time traffic monitoring tool.

Syntax iftop (option) option iftop: display bandwidth usage on an interface by host Synopsis: iftop-h | [- npblNBP] [- I interface] [- f filter code] [- F net/mask] [- G net6/mask6]-h display this message-n don't do hostname lookups-N don't convert port numbers to services-p Run in promiscuous mode (show traffic between other hosts on the same network segment)-b don't display a bar graph of traffic-B Display bandwidth in bytes-i interface listen on named interface-f filter code use filter code to select packets to count (default: none But only IP packets are counted)-F net/mask show traffic flows in/out of IPv4 network-G net6/mask6 show traffic flows in/out of IPv6 network-l display and count link-local IPv6 traffic (default: off)-P show ports as well as hosts-m limit sets the upper limit for the bandwidth scale-c config file specifies an alternative configuration file -t use text interface without ncurses Sorting orders:-o 2s Sort by first column (2s traffic average)-o 10s Sort by second column (10s traffic average) [default]-o 40s Sort by third column (40s traffic average)-o source Sort by source address-o destination Sort by destination address The Following options are only available in combination with-t-s num print one single text output afer num seconds Then quit-L num number of lines to print interface describes the bandwidth of the first behavior This is 1Mbit, not bytes. Connection list, the last three columns are the average traffic of 2 seconds, 10 seconds and 40 seconds respectively = > represents sending represents receiving the last three lines of sending, receiving and all traffic, the second column is that you run iftop to the current traffic, the third column is the peak value, and the fourth column is the average.

By default, instance iftop # monitors the traffic of the first network card iftop-I eth2 # Monitoring eth2 iftop-n # directly displays IP, and iftop-N # directly displays the port number without DNS reverse parsing. Do not display the service name iftop-F 192.168.1.0 Linux iftop 24 or 192.168.1.0 ash 255.255.255.0 # shows the inbound and outbound packet traffic of a network segment. "how to use the command?" Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report