I'm having trouble with my internet service provider.
Despite having set up a smoke ping server that clearly shows that there are intermittent spikes of latency with packet loss, they have asked for traceroutes to each of the smokeping servers targets; one set when there is no latency/loss and another when there is.
I understand why they are asking, they want to see if there is some kind of routing issue.
I've created a script that traceroutes all targets at once and outputs to a file, but I need to develop a script that calls the traceroute script when latency exceeds a certain value.
To this end, I have made the following script, but it's failing as cut includes not just a number but also "ms". How can I further filter its output to include just the number?
#/bin/bash
while :
if [ ping | cut -f5 d" " -gl 400 ]
then
wait 15
else
./path/script
fi
done