For a SmartRG SR515ac on an ADSL line, if you've got a *nix box (Linux, macOS, *BSD), you can do as below -- which is a 10-minute ugly hack to extract the data from the web pages that the modem offers up:
For which the output is
which you can log over time to see the sync rates etc evolve. I log every 5 minutes.
Code: Select all
curl -u user:user --connect-timeout 30 --max-time 60 -s 'http://192.168.42.1/admin/{statsadsl.html,statswan.cmd}' | \
tr -d '\n' | \
sed 's=</tr>=\n=g;s=<td>==g;s=</td>=@=g' | \
grep -e '>Rate (Kbps):' -e '>SNR Margin (dB):' -e '>Attainable Rate (Kbps):' -e '>ipoe_0_0_35' | \
awk -F@ -v date="`date "+%Y-%m-%d %H:%M"`" \
'BEGIN {for (i=1;i<=8;i++)info[i]=-1;} \
/>Rate/ {info[1]=$2; info[2]=$3} \
/>Attainable Rate/ {info[3]=$2; info[4]=$3} \
/>SNR Margin/ {info[5]=$2; info[6]=$3} \
/>ipoe_0_0_35/ {info[7]=0+$2; info[8]=0+$10} \
END {print date,info[1], info[2], info[3], info[4], info[5], info[6], info[7], info[8]}'
Code: Select all
date rate-d rate-u att-rate-d att-rate-u snr-d snr-u bytes-d bytes-u