See the real-time traffic consumed by the Linux connection process iftop netatop nethogs

Source: Internet
Author: User

Because the new plant's machine above the business mix deployment is very serious, and the intranet extranet shared a network card (this is more incredible), resulting in sometimes to locate some process traffic problem is very difficult, so recently spent a bit of time on the internet to collect a (aptitude search top$), a rough comparison of , probably the following atop-similar to SAR, with the kernel module can achieve process-level traffic statistics (NETATOP), the most convenient is aptitude can be installed directly (including kernel modules), the software itself to this year has been updated, "recommended learning"

htop– similar to top but does not involve network

iftop-Interactive, similar to top, with bandwidth usage sorting, other features No

Jnettop-are similar to Iftop and Iptraf, but support output to text for subsequent processing is a feature. But it's not updated since July 27, 2006.

ntop-Interactive or daemon mode, provides Web interface, supports top n host and Top N protocol "recommended learning"

sntop-is used for monitoring, not for traffic analysis.

iptraf-Interactive, you can also see the most traffic in the port, but after September 2005 has not been updated

trafshow-relatively concise, small tools, like iftop, can be more intuitive to see the flow of the machine "recommended"

sar-old tools, but the command is too complex, too large, suitable for refinement of the analysis, if only need to locate traffic problems, not used.

Latencytop-This is a tracking system call, not a network-related

logtop-an interesting gadget that can sort the input by the number of occurrences, or complete a watch ' Tail FILE | Sort | uniq-c | Sort-gr ' 's function




Nethogs Viewing process traffic

View system version and number of digits
Uname-a
Uname-r
These two can view the version number and the number of digits
Getconf Long_bit
The top three can see the number of digits
Download
wget ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/nethogs-0.8.0-1.el6.x86_64.rpm
Installation
Yum Install nethogs-y back tab

After installation, run Nethogs directly.

The default is to monitor eth0

If you want to monitor multiple network adapters

Nethogs eth0 eth1

This will add the NIC to the back.

The plus-d parameter specifies the refresh time

nethogs-d 1 eth0 eth1

is to update the network card eh0 and eth1 traffic information every second.

Can show PID, user, process, NIC, send traffic, receive receive, total traffic

Press m to toggle the traffic unit

B, KB, MB, kb/sec

Both Q and CTRL C are exited

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.