Skip to content

Instantly share code, notes, and snippets.

@barkink
Created June 19, 2017 09:20
Show Gist options
  • Save barkink/148250aab9b1d1a7a159f6a142828eb5 to your computer and use it in GitHub Desktop.
Save barkink/148250aab9b1d1a7a159f6a142828eb5 to your computer and use it in GitHub Desktop.
Throughput2.sh
rx1=`cat /sys/class/net/eth0/statistics/rx_bytes`;tx1=`cat /sys/class/net/eth0/statistics/tx_bytes`;`sleep 1` ;rx2=`cat /sys/class/net/eth0/statistics/rx_bytes`;tx2=`cat /sys/class/net/eth0/statistics/tx_bytes`;echo -n "RX: $((($rx2-$rx1)/1024)) Kbps";echo -n " - ";echo -n "RX: $((($tx2-$tx1)/1024)) Kbps";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment