linux system to maintain operational monitoring of the htop or toop and linux systems, including cpu, and ftop network traffic monitoring

llinux system maintenance htop or top and cpu etc. linux system operational detection and iftop

Online traffic plugin https://github.com/lvwuwei/traffic_monitor/

Linux looks at network traffic

Original article:Linux looks at network traffic

As a non-occupational business, it is necessary to view the network traffic on Linux servers from time to time. This paper presents several commonly used Linux traffic orders and briefly describes their usage. Some command systems are built in, while some commands need to be installed either from software warehouses or by self-depreciation, using the CentOS system as an example of software installation.

View total traffic

ip

ip Command from iproute2util package is a tool to view and configure networks/routings. ifconfig alternatives,ip The command function is stronger and more semantic.

ipCommands are installed defaultly on most systems and can also be passed yum install -y iproute Install.ip ” of the– S-h-h-h.” Parameters to see the total flow of each card, as shown below ip -s -h link , and the output result:

ip命令输出结果

nload

nload The command allows the current network rate of each network device to be viewed, and also shows the total flow of equipment passing through.

nload FromEPELLibrary, CentOS installation commands are:yum install -y epel-release && yum install -y nload. View the eth0 network traffic nload eth0The command output is as follows:

nload查看网络流量

PS:netstat -s and ifconfig -s You can also view the total packages sent and received (in English)netstatbytes are not given.

See real-time speed.

nload The command can output the current web speed, as described above, and is not repeated in this section.

dstat

dstat It’s a replacement.vmstat、iostat、netstat、nfsstatandifstatA fully functional system information statistical tool to support real-time data updating and output intuitive understanding.

dstat The default is not installed, and the installation commands are:yum install -y dstat。dstat -tnf 1 10 Output of network data per second in 10 seconds:

dstat输出

– I don’t know.

sar It is an abbreviation of the System Activity Report, a comprehensive Linux operational status statistics and performance analysis tool that can report system activities from multiple dimensions such as disk IO, CPU loads, memory usage, etc.

sar Command from sysstat package, with which you can install:yum install -y sysstat。sar -n TCP 1 10You can see tcp data in the next 10 seconds:

sar查看tcp数据

View connection/process flow

ss/netstat

ss and netstat is a common command to view active links/interview ports.ss Yes. netstat Alternative, better performance, recommended use.

ss Yes. iproute2util Part of the package, so that it is installed by default on most systems and can also be usedyum install -y iprouteInstall.netstat From net-tools Packages, new versions of the system will need to be installed on their own:yum install -y net-tools… the following figure is usedssView the output of tcp connections:

ss查看tcp连接

iftop

iftop It is a real-time traffic monitoring tool that allows for the real-time rate of each connection.

iftop FromEPELLibrary, installation orders are:yum install -y epel-release && yum install -y iftop。iftop -nN -i eth0Read the connection and speed of the eth0 card in real time:

iftop查看实时网速

nethogs

nethogs It is a tool designed to view the flow of individual processes, which are organized in bandwidth according to the process.

nethogs FromEPELLibrary, installation orders are:yum install -y epel-release && yum install -y nethogs。nethogs -d 2 eth0 Process flow information is refreshed every 2 seconds through the eth0 webcard:

nethogs输出

Other

tcpdumpThe data that can be used to grab the package and save can be opened and viewed in wireshark.

References

1. Linux Sar command details.

未经允许不得转载:萌萌Apprentissage » linux system to maintain operational monitoring of the htop or toop and linux systems, including cpu, and ftop network traffic monitoring

Like (0) 打赏

Comments 0

Protected with IP Blacklist CloudIP Blacklist Cloud
  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

//下一个脚本特效
//下一个脚本