3.30 is ok
5.26 is ok
6.18 is log put script error: no such item (4)
:foreach reci in=[/ppp active find] do={
/interface monitor-traffic $reci once do={
:log warning ($reci);
}
}
3.30 is ok
5.26 is ok
6.18 is log put script error: no such item (4)
:foreach reci in=[/ppp active find] do={
/interface monitor-traffic $reci once do={
:log warning ($reci);
}
}
First of all, you can not put ID as value for name parameter.
:foreach reci in=[/ppp active find] do={
/interface monitor-traffic [find where name~[/ppp active get $reci value-name=name]] once do={
:log warning message=$reci;
};
};
And about “:log warning message=$reci;” what you expect the script do?
Thank you, friends
CPU use rate than before the script to high.
Using this script CPU usage is high
Something has changed that I can’t put my finger on, but if you run your original script on earlier versions, the output looks very different and it takes forever to complete. If you make one little adjustment, it seems to run equally well. My guess is that the different behavior gives at PPP connection time to disappear, hench the error you see. Here is the slightly modified script:
:foreach reci in=[/ppp active find] do={
/interface monitor-traffic $reci once do={
:log warning $reci;
}
}
All that is changed is that I removed the parentheses around $reci in the :log line.
![]()
:foreach reci in=[/ppp active find] do={
/interface monitor-traffic $reci once do={
}
}
2.9.51 Run OK
3.30 Run OK
4.17 Run OK
5.26 Run OK
6.18 log :: script error: no such item(4)
:foreach reci in=[/ppp active find] do={
/interface monitor-traffic [find where name~[/ppp active get $reci value-name=name]] once do={
}
}
this script 6.18 Run OK,but CPU use rate increased 18% in the original basis
What type of ppp connection you want monitor?
Try this one on 6.18 (wont work on versions < 6.x)
:foreach reci in=[/ppp active find] do={
:do {
/interface monitor-traffic $reci once do={
:log warning $reci
}
} on-error={
:log warning ($reci . " disappeared")
}
}
6.31 log :: script error: no such item(4)
:foreach reci in=[/ppp active find] do={
:do {
/interface monitor-traffic $reci once do={
:log warning $reci
}
} on-error={
:log warning ($reci . " disappeared")
}
}