For example:
I define IP address and ping count.
And script should write in log.txt something like this:
Thanks for help and sorry for bad english.Jan 17 05:00:00 sent=555 received=545 packet-loss=0% min-rtt=49ms avg-rtt=52ms max-rtt=54ms
Thanks for help and sorry for bad english.Jan 17 05:00:00 sent=555 received=545 packet-loss=0% min-rtt=49ms avg-rtt=52ms max-rtt=54ms
:local aptime
:local mxptime
:local mnptime
:local se
:local re
/tool flood-ping 1xx.x.x.x count=10 do={
:set aptime ($"avg-rtt");
:set mxptime ($"max-rtt");
:set mnptime ($"min-rtt");
:set re ($received);
:set se ($sent);
}
log info "Avg $aptime Max $mxptime Min $mnptime Received $re/ from $se"
DATE & 10:50:11 script,info Avg 3 Max 6 Min 1 Received 10/ from 10