2018-03-05T10:22:04Z||2018-03-06T10:59:22Z


cat /proc/net/dev

显示网卡的当前状态,比如收到的字节数等...

Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
  p2p1:       0       0    6    0    0     6          0         0        0       0    0    0    0     0       0          0
  p2p2:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
    lo:   19864     335    0    0    0     0          0         0    19864     335    0    0    0     0       0          0
   em1:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
   em3:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
   em2:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
   em4:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0

另一个命令:

ifconfig

也类似。

em1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 44:a8:42:39:bb:39  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 35

em2: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 44:a8:42:39:bb:3a  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 69
ethtool <ID> # 比如p1p1

显示网卡的设备信息。

    Supported ports: [ FIBRE ]
    Supported link modes:   1000baseT/Full
                            10000baseT/Full
    Supported pause frame use: Symmetric
    Supports auto-negotiation: Yes
    Advertised link modes:  1000baseT/Full
                            10000baseT/Full
    Advertised pause frame use: Symmetric
    Advertised auto-negotiation: Yes
    Speed: 10000Mb/s
    Duplex: Full
    Port: FIBRE
    PHYAD: 0
    Transceiver: external
    Auto-negotiation: on
    Supports Wake-on: d
    Wake-on: d
    Current message level: 0x00000007 (7)
                   drv probe link
    Link detected: yes