Determining network adapter speeds on linux

If you need to determine the configured speeds of the network adapters on your linux server,  the ethtool command provides the answer. You can find the speed of all your ethernet adapters with a simple unix script:

for eth in `ifconfig | grep '^eth[0-9] ' | cut -f1 -d' '` ; do 
  echo $eth: `ethtool $eth | grep Speed` 

This will produce output such as:

eth0: Speed: 1000Mb/s
eth1: Speed: 1000Mb/s
eth2: Speed: 1000Mb/s
eth3: Speed: 1000Mb/s
eth4: Speed: 4000Mb/s
eth5: Speed: 4000Mb/s
eth6: Speed: 4000Mb/s
eth7: Speed: 4000Mb/s