routeros-api-php icon indicating copy to clipboard operation
routeros-api-php copied to clipboard

Unable to use /ping will not output the content

Open wartw opened this issue 3 years ago • 0 comments

Unable to use /ping will not output the content

wartw avatar Jun 11 '22 09:06 wartw

In RouterOS ping tool is never ending (as it's Linux based), which would expect this API to read the continuous output, but the router will never issue !done whilst the command is running. So you'll never get the output.

You'll want to add count to the end of the command to get an output and close off the connection.

See https://github.com/EvilFreelancer/routeros-api-php/blob/master/examples/monitoring.php for an example of monitoring traffic on an interface by adding once to the query.

jonth93 avatar Aug 15 '22 13:08 jonth93

Yep, need to limit it via count of packets.

EvilFreelancer avatar Aug 15 '22 14:08 EvilFreelancer