Skip to content

Instantly share code, notes, and snippets.

View fitz123's full-sized avatar

Anton Lugovoi fitz123

View GitHub Profile
@fitz123
fitz123 / netspeed.sh
Last active February 24, 2017 16:33 — forked from joemiller/netpps.sh
#!/bin/bash
sleep_time="${1:-1}"
while read int; do
let "rx_bytes0+=$(<${int}statistics/rx_bytes)"
let "tx_bytes0+=$(<${int}statistics/tx_bytes)"
done < <(ls -d /sys/class/net/*/)
sleep $sleep_time