View network card traffic under Linux

Source: Internet
Author: User
Tags disk usage

How to look at network traffic under Linux?

Under Windows, we can easily view network traffic through 360来 and know which process consumes more network bandwidth. It is very important for the Web server to see how the traffic is in Linux.

The following blog is a very careful introduction of Linux under the view of the flow of methods:

Linux various ways to view network card traffic http://jasonyong.blog.51cto.com/47753/174197

I used some of them, and also found some other information on the Internet, summarized as follows:

1. using Iptraf

Iptraf is a text screen interface tool for viewing network traffic in real time.

Some systems are not necessarily installed,

If it is RHEL, then go to the installation disk to find the iptraf*.rpm package installation;

If it's CentOS, install it with Yum install-y Iptraf

Iptraf is a text full screen interface, the operation is relatively simple and clear. It is best to use putty to see that SECURECRT may show garbled characters.

It provides a number of statistical methods:

(1) IP traffic monitor

(2) General interface statistics

(3) Detailed interface statistics

If you follow the-b parameter, you can also execute it in the background and save the data to a file in the/var/log/iptraf directory.

2. nload

Not a system comes with a program.

3. Ifstat

Not a system comes with a program.

4. Sar

If the system is not installed,

If it is RHEL, then go to the installation disk to find sysstat*.rpm package installation;

If it is CentOS, install it with Yum install-y Sysstat.

http://www.turbolinux.com.cn/turbo/wiki/ wrote

Sysstat is a toolkit that contains several very useful system detection programs, Iostat,mpstat and SAR.
This toolkit is included on each version of the Turbolinux.
The iostat is used to output statistics for the CPU,I/O system and disk partitions. Can be used to analyze disk I/O, bandwidth and other information.
The mpstat is used to output various statistical information about the CPU. It can be used to analyze the operation of the program in kernel State and user state.
The SAR is used to collect various state information of the system in time. The state of each point in the system can then be monitored.

SAR There are many uses, if you want to monitor network traffic, use the following command-line method:

Sar-n DEV interval Count

Where interval is the statistical interval, in seconds, Count is counted a total of several times, and if the constant statistic is 0 until Ctrl + C is interrupted, the count is executed to exit.

For example: Sar-n DEV 1 4

For example: Sar-n DEV 10 0

IFACE : LAN interface
RXPCK/S: Packets Received per second
TXPCK/S: Packets Sent per second
rxbyt/s: Number of bytes received per second
txbyt/s: Number of bytes sent per second

The following information also describes other uses of the SAR:

How to view network traffic and hard disk usage under Linux http://www.yesadmin.com/301/133723/index.html

5. Watch More/proc/net/dev

Not intuitive.

6. Watch Ifconfig

Not intuitive.

7. Iftop

Not a system comes with a program.

8. mtr

mtr It is also a text screen program that is installed using the Yum install-y mtr.

I didn't use it carefully.

9. ntop

Provides a web interface for viewing. NTOP also supports the Windows platform.

The following information describes the installation of the NTOP

Linux-based ntop installation configuration http://linuxtro.blog.51cto.com/1239505/292709

Interactive Encyclopedia wrote

NTOP is a monitoring Network Traffic , using ntop to show that the network usage is more intuitive and detailed than some other webmaster software. NTOP can even list the network bandwidth utilization of each node computer.

NTOP is a flexible, fully functional, to monitor and solve LAN the tool for the problem. It also provides command-line input and a web interface that can be applied to embedded Web services.

This tool should be pretty good.

tcpdump + command combination

https://bbs.et8.net/bbs/showthread.php?t=674503 wrote

Tcpdump-i ETH0-NV > 111
#top10 IP
Cat 111|awk ' {print-$} ' |cut-d '. "-f1-4|grep 192.168|sort|uniq-c|sort-rn|head

If tcpdump is not installed, install it using the Yum install-y tcpdump.

I didn't use it, and I didn't work on it for the time being.

Vnstat.

Simple and practical network traffic statistics tool http://wowubuntu.com/vnstat.html

have never been used.


This article is from the "Linux" blog, so be sure to keep this source http://johnnyqian.blog.51cto.com/7974510/1854166

View network card traffic under Linux

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.