09.12.2020, 07:19
For bandwidth test you need to use readlist because MT will report test result every second (this also means that the timeout value should not be changed). The last element of res table will contain the final result.
Code:
res, err = mt:readlist('/tool/bandwidth-test', '=address=38.104.52.187', '=duration=10s', '=direction=both', '=protocol=tcp', '=user=btest', '=password=btest')
testresults = res[ #res ]
log(testresults, err)