Real-time network traffic monitoring in Linux

Source: Internet
Author: User

Tool 1 SAR

The SAR command is included in the sysstat toolkit and provides numerous statistics about the system. Its commands vary in different systems. Here we only talk about its network data monitoring parameters.

Sar-N [Dev | EDEV | sock] interval CNT

The SAR provided by some systems supports statistics based on network interfaces. This command can view the number and traffic of packets sent and received per second on the device.

Sar-n udp | TCP | sock interval CNT

SAR provided by some systems supports protocol-based data statistics. This command allows you to view packets sent and received and error data for specific protocols.

Sar-T | u interval CNT

Similar to the preceding command, the parameter format and output format are different.

Download and install wget plugin

 

Tool 2 vnstat

The vnstat command reads/proc/NET/dev data and saves historical data in a specific database. It also provides data formatting to display historical or real-time traffic information.

Vnstat-l-I eth0 supports real-time display of network traffic and packets

Download and install wget http://humdi.net/vnstat/vnstat-1.10.tar.gz, decompress it, and install it as instructed.

 

Tool 3 ifconfig

Ifconfig itself provides the current real-time traffic information of an interface, which can be dynamically updated using the watch command.

Watch-N 1 "ifconfig eth0"

 

Tool 4 netstat

Netstat supports real-time statistical analysis of data of specific protocols, and can also be dynamically updated using the watch command

Watch-N 1 "netstat-S-u | T"

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.