[Linux] Performance optimization-linux command nicstat network performance monitoring

Article Directory


Insert picture description here

1 Overview

A popular command line tool in Unix is ​​nicstat 它可以显示每个网络接口的流量概要,包括网络接口的使用度:

% nicstat 5
Time Int rKB/s wKB/s rPk/s wPk/s rAvs wAvs %Util Sat
17:05:17 e1000g1 225.7 176.2 905.0 922.5 255.4 195.6 0.33 0.00

The e1000g1 in the example is a 1000 MB interface, and the usage rate is very low (0.33%). This tool (and other similar tools) can be used to calculate the usage rate of the interface. In the above output, the data write rate of the interface is 225.7 Kbps, and the read rate is 176.2 Kbps. For a 1000 MB network, after dividing, you can get a utilization rate of 0.33%, and nicstat can also automatically calculate the bandwidth of the interface.

Tools such as typeperf or netstat can report data read and written, but to calculate network usage, you must use a script to calculate the bandwidth of the interface. Although the unit reported by general tools is byte per second (Bps), please remember that the unit of bandwidth

Guess you like

Origin blog.csdn.net/qq_21383435/article/details/114906861