本文主要来自于ethtool -h的信息,编写本文的目的在于记录日常ethtool工具的使用;
ethtool DEVNAME
ethtool -s|--change DEVNAME
速率 [ speed %d ]
通信模式 [ duplex half|full ]
网口类型 [ port tp|aui|bnc|mii|fibre ]
[ mdix auto|on|off ]
自动协商 [ autoneg on|off ]
[ advertise %x ]
[ phyad %d ]
[ xcvr internal|external ]
[ wol p|u|m|b|a|g|s|d... ]
[ sopass %x:%x:%x:%x:%x:%x ]
[ msglvl %d | msglvl type on|off ... ]
ethtool -a|--show-pause DEVNAME Show pause options
ethtool -A|--pause DEVNAME
自动协商 [ autoneg on|off ]
接收 [ rx on|off ]
发送 [ tx on|off ]
ethtool -c|--show-coalesce DEVNAME
ethtool -C|--coalesce DEVNAME
[adaptive-rx on|off]
[adaptive-tx on|off]
[rx-usecs N]
[rx-frames N]
[rx-usecs-irq N]
[rx-frames-irq N]
[tx-usecs N]
[tx-frames N]
[tx-usecs-irq N]
[tx-frames-irq N]
[stats-block-usecs N]
[pkt-rate-low N]
[rx-usecs-low N]
[rx-frames-low N]
[tx-usecs-low N]
[tx-frames-low N]
[pkt-rate-high N]
[rx-usecs-high N]
[rx-frames-high N]
[tx-usecs-high N]
[tx-frames-high N]
[sample-interval N]
ethtool -g|--show-ring DEVNAME
ethtool -G|--set-ring DEVNAME
[ rx N ]
[ rx-mini N ]
[ rx-jumbo N ]
[ tx N ]
ethtool -k|--show-features|--show-offload DEVNAME
ethtool -K|--features|--offload DEVNAME
FEATURE on|off ...
ethtool -i|--driver DEVNAME Show driver information
ethtool -d|--register-dump DEVNAME
[ raw on|off ]
[ file FILENAME ]
ethtool -e|--eeprom-dump DEVNAME
[ raw on|off ]
[ offset N ]
[ length N ]
ethtool -E|--change-eeprom DEVNAME
[ magic N ]
[ offset N ]
[ length N ]
[ value N ]
ethtool -r|--negotiate DEVNAME
ethtool -p|--identify DEVNAME
[ TIME-IN-SECONDS ]
ethtool -t|--test DEVNAME
[ online | offline | external_lb ]
ethtool -S|--statistics DEVNAME Show adapter statistics
ethtool --phy-statistics DEVNAME Show phy statistics
ethtool -n|-u|--show-nfc|--show-ntuple DEVNAME
[rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6|rule %d ]
ethtool -N|-U|--config-nfc|--config-ntuple DEVNAME
rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 m|v|t|s|d|f|n|r... |
flow-type ether|ip4|tcp4|udp4|sctp4|ah4|esp4|ip6|tcp6|udp6|ah6|esp6|sctp6
[ src %x:%x:%x:%x:%x:%x [m %x:%x:%x:%x:%x:%x] ]
[ dst %x:%x:%x:%x:%x:%x [m %x:%x:%x:%x:%x:%x] ]
[ proto %d [m %x] ]
[ src-ip IP-ADDRESS [m IP-ADDRESS] ]
[ dst-ip IP-ADDRESS [m IP-ADDRESS] ]
[ tos %d [m %x] ]
[ tclass %d [m %x] ]
[ l4proto %d [m %x] ]
[ src-port %d [m %x] ]
[ dst-port %d [m %x] ]
[ spi %d [m %x] ]
[ vlan-etype %x [m %x] ]
[ vlan %x [m %x] ]
[ user-def %x [m %x] ]
[ dst-mac %x:%x:%x:%x:%x:%x [m %x:%x:%x:%x:%x:%x] ]
[ action %d ]
[ loc %d]] |
delete %d
ethtool -T|--show-time-stamping DEVNAME
ethtool -x|--show-rxfh-indir|--show-rxfh DEVNAME
ethtool -X|--set-rxfh-indir|--rxfh DEVNAME
[ equal N | weight W0 W1 ... | default ]
[ hkey %x:%x:%x:%x:%x:.... ]
[ hfunc FUNC ]
ethtool -f|--flash DEVNAME
FILENAME [ REGION-NUMBER-TO-FLASH ]
ethtool -P|--show-permaddr DEVNAME
ethtool -w|--get-dump DEVNAME
[ data FILENAME ]
ethtool -W|--set-dump DEVNAME
N
ethtool -l|--show-channels DEVNAME
ethtool -L|--set-channels DEVNAME
[ rx N ]
[ tx N ]
[ other N ]
[ combined N ]
ethtool --show-priv-flags DEVNAME
ethtool --set-priv-flags DEVNAME
FLAG on|off ...
ethtool -m|--dump-module-eeprom|--module-info DEVNAME
[ raw on|off ]
[ hex on|off ]
[ offset N ]
[ length N ]
ethtool --show-eee DEVNAME
ethtool --set-eee DEVNAME
[ eee on|off ]
[ advertise %x ]
[ tx-lpi on|off ]
[ tx-timer %d ]
ethtool --set-phy-tunable DEVNAME
[ downshift on|off [count N] ]
ethtool --get-phy-tunable DEVNAME
[ downshift ]
ethtool --reset DEVNAME Reset components
[ flags %x ]
[ mgmt ]
[ mgmt-shared ]
[ irq ]
[ irq-shared ]
[ dma ]
[ dma-shared ]
[ filter ]
[ filter-shared ]
[ offload ]
[ offload-shared ]
[ mac ]
[ mac-shared ]
[ phy ]
[ phy-shared ]
[ ram ]
[ ram-shared ]
[ ap ]
[ ap-shared ]
[ dedicated ]
[ all ]
ethtool --show-fec DEVNAME
ethtool --set-fec DEVNAME
[ encoding auto|off|rs|baser ]
ethtool -h|--help
ethtool --version