In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to check the network card traffic in Linux, in view of this problem, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
One: for Linux network card traffic view, iptraf is a very good tool. RHEL5 iso comes with it, and my system is not installed by default. It can be counted according to the needs of users, according to different protocols, according to different ports, and according to different network cards. In short, it is a very powerful tool. Enter: iptraf directly on the command line to enter a text graphical interface, as follows:
Ip traffic monitoring simple traffic statistics detailed traffic statistics this is not very clear Lan statistics Fileters: set some filtering options, such as: ip,arp rarp and so on. Configure: some configuration options, one that I find very useful is log configuration. You can specify that the monitoring information is saved to the location specified by the user in the form of a log. Choose-* first, take a look. As shown in the figure:
I choose all network cards.
I turned on the log function, the location of the log, the default.
I use a virtual machine in this experiment, and my real machine is in the non-stop ping testing machine. The tool also has some command parameters, which are actually the above options. It's convenient. You can man it. Second: for the Linux network card traffic view nload this tool, RHEL5 does not have its own, you need to download an installation. On the command line
Enter the command directly. Get the following results. As shown on the left of the picture, it is very intuitive and good. Three: ifstat as a tool
RHEL5 doesn't come with it either, but it's also a nice, easy-to-use tool. After installation, enter the command directly, and the effect is as follows
If there are multiple network cards, there will be multiple columns. It's pretty good. Four: Linux network card traffic check sar this tool RHEL5 comes with, also installed by default. A powerful tool (it seems that these tools are quite strong), a lot of parameters, have time to man. The-n parameter is useful because it has six different switches: DEV | EDEV | NFS | NFSD | SOCK | ALL. DEV displays network interface information, EDEV displays statistics about network errors, NFS statistics about active NFS clients, NFSD statistics NFS server information, SOCK displays socket information, ALL displays all five switches. They can be used alone or together. What we need to use now is-n DEV. Enter the command: sar-n DEV 1 4
The last 1 / 4 of the command means: take the value once every second, take four times. IFACE:LAN interface
Rxpck/s: packets received per second
Txpck/s: packets sent per second
Rxbyt/s: bytes received per second
Txbyt/s: bytes sent per second
Rxcmp/s: compressed packets received per second
Txcmp/s: compressed packets sent per second
Rxmcst/s: multicast packets received per second
IFACE:LAN interface rxerr/s: bad packets received per second txerr/s: bad packets sent per second coll/s: collisions per second rxdrop/s: because the buffer is full, the number of received packets discarded per second txdrop/s: because the buffer is full, the number of sent packets dropped per second txcarr/s: when sending packets Carrier errors per second rxfram/s: frame alignment errors per second received packets rxfifo/s: received packets per second FIFO overspeed errors txfifo/s: packets sent FIFO overspeed errors per second the following simpler methods, although you can see the traffic statistics, but too simple, and not intuitive. Command: [root@station204 ~] # watch more / proc/net/dev
Command: [root@station204 ~] # watch ifconfig
This is the answer to the question about how to view the network card traffic in Linux. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
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.