Commit dbfde1c4 authored by Olav Kvittem's avatar Olav Kvittem
Browse files

max-hops parameter

parent 3fa86248
Pipeline #45592 passed with stages
in 1 minute and 15 seconds
......@@ -8,9 +8,9 @@ phour=-1
hour=$(date +%H)
if test "$max_hops" != ""; then
$hop_parm="-m $max_hops"
hop_parm="-m $max_hops"
else
$hop_parm=""
hop_parm=""
fi
while test $hour -ge $phour; do # do until midnight
......
......@@ -4,8 +4,14 @@ source $(dirname "${BASH_SOURCE[0]}")/../etc/start.cfg
> $logpath/$date/traceroute_$1.gz
if test "$max_hops" != ""; then
hop_parm="-m $max_hops"
else
hop_parm=""
fi
while true; do
date +%s | gzip -c >> $logpath/$date/traceroute_$1.gz
traceroute6 -n $1 2> /dev/null | gzip -c >> $logpath/$date/traceroute_$1.gz
traceroute6 -n $hop_parm $1 2> /dev/null | gzip -c >> $logpath/$date/traceroute_$1.gz
sleep 120
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment