linux网络流量数据统计

两种方法:
1.ifcong来进行获取
2.

[root@node1 shell]# cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
enp0s3:   62486     202    0    0    0     0          0         0    43068     233    0    0    0     0       0          0
enp0s8:  815494    9270    0    0    0     0          0        64   881909    6002    0    0    0     0       0          0
    lo:  138324    1188    0    0    0     0          0         0   138324    1188    0    0    0     0       0          0
virbr0-nic:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
virbr0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0

上面是累计值,从装机到目前为止

你可能感兴趣的:(linux,运维,服务器)