centos查看网络流量及重置网络流量统计

warning: 这篇文章距离上次修改已过771天,其中的内容可能已经有所变动。

查看网络流量

cat /proc/net/dev

重置网络流量统计

1.查看网卡

ifconfig

2.查看网络驱动

ethtool -i eth0

[root@localhost ~]# ethtool -i eth0
driver: virtio_net
version: 1.0.0
firmware-version:
expansion-rom-version:
bus-info: 0000:00:12.0
supports-statistics: no
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no

3.移除驱动并重装,再重启网卡

modprobe -r virtio_net;modprobe virtio_net;ifdown eth0;ifup eth0
或者modprobe -r virtio_net;modprobe virtio_net;systemctl restart network

如果出现-bash: ethtool: command not found错误
可以使用apt-get install ethtool命令安装ethtool软件包;

最后修改于:2022年02月17日 15:48

添加新评论