Created
August 30, 2021 02:22
-
-
Save EsmailELBoBDev2/74abc735321f338311c6124276cef1be to your computer and use it in GitHub Desktop.
bandwidth checker for linux - to test how much website is taking to load up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
init="$(($(cat /sys/class/net/[ew]*/statistics/rx_bytes | paste -sd '+')))" | |
printf "Recording bandwidth. press enter to stop." | |
read -r lol | |
fin="$(($(cat /sys/class/net/[ew]*/statistics/rx_bytes | paste -sd '+')))" | |
printf "%4sB of bandwidth used. \\n" $(numfmt --to=iec $(($fin-$init))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
stolen from https://invidious.snopyta.org/watch?v=cvDyQUpaFf4 video