I am trying to set up a script to run a bandwidth test but can’t get it to log the output to a file.
The entry in the wiki seems to be out of date as it doesn’t list all the available options.
The following options are listed in the CLI but not in the Wiki
append –
as-value –
do –
file –
once –
‘File’ writes output to a file, but only seems to write the initial screen (with all 0’s), ‘once’ seems to do the same at the CLI, ‘append’ I guess probably appends to the file rather than overwriting it, not sure what ‘do’ or ‘as-value’ do??
never mind the script - at present I just want it to work from the CLI…
This works OK:
[ROS] > /tool bandwidth-test 192.168.42.11 direction=transmit duration=10s protocol=udp
status: done testing
duration: 10s
tx-current: 20.5Mbps
tx-10-second-average: 17.8Mbps
tx-total-average: 17.8Mbps
random-data: no
direction: transmit
tx-size: 1500
but if I send the output to a file:
[ROS] > /tool bandwidth-test 192.168.42.11 direction=transmit duration=10s protocol=udp file=btest
Then I get this:
for my final purpose all I really want is (one of) the final speed figures so I will need to parse the output to print just that figure, but I can do this after I get the result file into my linux box so it doesn’t need to be done on the routerboard…
There might be a better way to do this, but here’s what worked for me. It runs the bandwidth test, and near the end of the test, desired variables are saved.