linux网卡流量统计清零,重置linux网卡流量统计
ifconfig eth0eth0Link encap:EthernetHWaddr 90:FB:A6:92:A2:56inet addr:192.168.1.110Bcast:192.168.1.255Mask:255.255.255.0inet6 addr: fe80::92fb:a6ff:fe92:a256/64 Scope:LinkUP BROADCAST RUNN...
ifconfig eth0
eth0 Link encap:Ethernet HWaddr 90:FB:A6:92:A2:56
inet addr:192.168.1.110 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::92fb:a6ff:fe92:a256/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8249571 errors:2 dropped:0 overruns:2 frame:0
TX packets:15357766 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1131763825 (1.0 GiB) TX bytes:22738570448 (21.1 GiB)
Interrupt:27 Base address:0xe000
有时候有这样的需求,想要把网卡流量统计清零,但有不能重启服务器。以下是方法:
1、yum install ethtool -y
2、执行 ethtool -i eth0 ,获得模块名称:
[root@web ~]# ethtool -i eth0
driver: forcedeth
version: 0.64
firmware-version:
bus-info: 0000:00:07.0
3、ifconfig eth0 down
4、modprobe -r forcedeth
5、modprobe forcedeth
6、ifconfig eth0 up
ifconfig eth0
eth0 Link encap:Ethernet HWaddr 90:FB:A6:92:A2:56
inet addr:192.168.1.110 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:27 Base address:0xe000
原创文章,转载请注明: 转载自笛声
更多推荐
所有评论(0)