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` 
done

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

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: