chmod +x ping.sh
ping.sh [ipaddr] [outputfile]
node index.js outputfile
a few years back i was experiencing terrible connection quality on my broadband service (plusnet, uk). their support was unhelpful as they wouldn't even acknowledge the issue. not a single day went by where the connection wouldn't drop for tens of minutes and, when it was "working", the packet loss was considerable and the speed terrible. i rescinded the contract and complained to the relevant authorities (comms ombudsman, uk). the stats i collected with this little tool helped me make my case and i ultimately won, avoiding paying any penalties (and having past payments refunded).