Skip to content

Instantly share code, notes, and snippets.

Last active Jan 5, 2022
What would you like to do?
mtr script to gather information about your laggy network connection so you can try to convince your ISP there actually is a problem
# When you're done, make a copy of this spreadsheet and paste report-filtered.csv into it to
# use the pivot tables to graph it out. The date column auto populates. Press ctrl+c to kill the script.
# Ignore SIGINT in this script. Just use it to kill the watch command and then let
# the script fall through to format the results.
trap handler SIGINT
watch -n 0 'mtr --report --report-cycles 15 --csv >> report-raw.csv'
head -n 1 report.csv > report-filtered.csv
# Filter our the header lines with grep or they'll appear throughout the csv. I just hard coded
# one header line in the google sheet at the top.
cat report-raw.csv | grep -v Mtr >> report.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment