Bandwidth test logging

Hi there,

I have an opportunity to sell some MT boxes to a major customer who wants to bandwidth test ethernet transmission circuits.

MT loaded on some embedded PC boards would be perfect.
Using Winbox I can see “live traffic” on the ethernet port and use the bandwidth testers on the box to generate/receive traffic.

Does anyone have a script to regularly (every 5 minutes) send a “throughput report” to any external store (email, FTP, or just append to a logfile)
(Apologies I am a scripting newbie, an expert will tell me this is obvious)

Would greatly appreciate help, preferably an example

Many thanks

example using e-mail!
here i’m checking transmitted data rate to address 1.1.1.1

/system script add name=bandtest source={
:global i
/tool bandwidth-test 1.1.1.1
direction=transmit
duration=14s
do={
:if ($status=“running”) do={
:set i $tx-current
}
}
}

/system scheduler add name=send_mail on-event=bandtest interval=5m disabled=no

Edgars

Hi Edzix

Thanks for the tip - this doesn’t look totally complete, there is no e-mail tool call - where do I put that?

Thanks for the help so far -

Regards

Stephen

yes, sorry, my mistake. Here is the correct one:

/system script add name=bandtest source={
:global i
/tool bandwidth-test 1.1.1.1
direction=transmit
duration=14s
do={
:if ($status=“running”) do={
:set i $tx-current
}
}
:delay 15s
/tool e-mail send to receiver@somehost.com subject=“Bandwidth test results” body=("Transmitted bytes/s: " . $i)
}