Community discussions

MikroTik App
 
donline
just joined
Topic Author
Posts: 5
Joined: Mon Aug 14, 2017 10:31 am

Getting interface stats from cli in ros 7

Thu Jun 09, 2022 1:07 am

I used to be able to get interface stats from the terminal, but am still unable to do this in ros 7.
> interface/ethernet/get value-name=tx-bytes ether1

Returns nothing with no error. Is there a syntax change I'm missing?

Thanks.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12003
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Getting interface stats from cli in ros 7

Thu Jun 09, 2022 1:08 am

Is like you do not remember well... also on v6 that syntax do not return nothing...

Try the correct syntax and probably work on both versions....
:put [/interface ethernet get ether1 tx-bytes]
 
donline
just joined
Topic Author
Posts: 5
Joined: Mon Aug 14, 2017 10:31 am

Re: Getting interface stats from cli in ros 7

Thu Jun 09, 2022 1:18 am

[admin@MikroTik] > /interface ethernet get ether1 tx-bytes
[admin@MikroTik] >

Thanks for the quick reply but please refrain from the attitude.

The command you offered is exactly what I used in scripts that worked in ros 6 but not since 7.
Last edited by donline on Thu Jun 09, 2022 1:24 am, edited 1 time in total.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12003
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Getting interface stats from cli in ros 7

Thu Jun 09, 2022 1:33 am

Thanks for the "axxhoxe" in report,
but instead I have provided to you the soluction, and you have ignored that.

RouterOS 7.2.3 (on example I use ether2 because I do not have any on ether1)

terminal code

[xxx@ROUTER-xxx] > :put [/interface ethernet get ether2 tx-bytes]
63 181 327 519

Who is online

Users browsing this forum: alexmason, Bing [Bot], gdanov, InfraErik, jingjingbalucan, Mr47 and 121 guests