Hi all,
Is there a way to calculate the average speed of an upload to use as a variable in a RouterOS script?
For example if I started an FTP upload of a file to a linux server on the cloud and I wanted to calculate the average upload speed over time.
I know the Mikrotik has btest but as it doesn’t have a linux implementation I cannot use it.
Thanks
Brien
I was playing around a bit with fetch uploading from a Mikrotik with v5.11 firmware to a linux server and I got the output below. Is there any way to access the duration value and store it??
[admin@MikroTik] /tool> fetch address=x.x.x.x src-path=xxx.rar user=admin mode=ftp password=xxxxx dst-path=xxx.rar
upload=yes
status: uploading
downloaded: 1434KiB
total: 12626KiB
duration: 16s
– [Q quit|D dump|C-z pause]
Thanks
Brien
:local duration;
:set duration [:time {/tool fetch address=x.x.x.x src-path=x.jpg user=xxx mode=ftp password=xxxx dst-path=x.jpg upload=yes}];
:put $duration;
Output : 00:00:13.061801
I was able to get the length of time it took by using :time. However the value returned is in the format 00:00:13.061801
Is it possible to convert that to an integer, 13
If I use :put [ :tonum $duration]; I get nothing returned?