Community discussions

MikroTik App
 
mcrose
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Wed May 06, 2009 8:00 pm

4.11 API bug: /queue/simple/print not giving access to stats

Sun Aug 15, 2010 5:39 pm

Unable to find anything in the changelog regarding this so I'm assuming it's a bug. /queue/simple/print no longer gives access to the statistica properties; IE what you get when running '/queue simple print stats' at the console.

RouterOS Version 4.11

15/08/2010 09.34.25 - info 102 - EXECUTE= /queue/simple/print =.proplist=name,bytes,packets
15/08/2010 09.34.25 - DEBUG 11001 - 10.0.0.1 tr_mkrouter.msend /queue/simple/print
15/08/2010 09.34.25 - DEBUG 11001 - 10.0.0.1 tr_mkrouter.msend =.proplist=name,bytes,packets
!re=name=foo
!re=name=bar
!re=name=baz

RouterOS Version 4.4

15/08/2010 09.34.25 - info 102 - EXECUTE= /queue/simple/print =.proplist=name,bytes,packets
15/08/2010 09.34.25 - DEBUG 11001 - 10.0.0.2 tr_mkrouter.msend /queue/simple/print
15/08/2010 09.34.25 - DEBUG 11001 - 10.0.0.2 tr_mkrouter.msend =.proplist=name,bytes,packets
!re=name=foo=bytes=0/0=packets=0/0
!re=name=bar=bytes=0/392=packets=0/8
!re=name=baz=bytes=979/0=packets=14/0

This is happening on both the Delphi API client as well as my Perl API client. Communication works properly, the router simply doesn't respond to the bytes or packets properties. Don't have a full suite of RouterOS revisions to test against so I'm unable to give a hard verion where this behavior started. However, I'm fairly certain I have this code running against routerOS as new as 4.6 with no issues.

Edit: Checked, most recent revision I have running that exhibits the latter behavior is 4.5.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: 4.11 API bug: /queue/simple/print not giving access to s

Sun Aug 15, 2010 8:00 pm

I think the new command/parameters are:
/queue simple print stats

So API should be something like
/queue/simple/print=stats=
 
mcrose
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Wed May 06, 2009 8:00 pm

Re: 4.11 API bug: /queue/simple/print not giving access to s

Sun Aug 15, 2010 8:05 pm

15/08/2010 12.03.09 - info 102 - EXECUTE= /queue/simple/print stats
15/08/2010 12.03.09 - DEBUG 11001 - 10.0.0.1 tr_mkrouter.msend /queue/simple/print stats
!trap=message=no such command
!done

Also, docs still say:

API print command differs from the console counterpart in the following ways:

* arguments that modify list of returned properties (detail, breif, ...) have no effect in the API.


Edit:


15/08/2010 12.07.54 - info 102 - EXECUTE= /queue/simple/print=stats=
15/08/2010 12.07.54 - DEBUG 11001 - 10.0.116.1 tr_mkrouter.msend /queue/simple/print=stats=
!trap=message=no such command
!done


Also, /queue simple print stats in the console isn't really new.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: 4.11 API bug: /queue/simple/print not giving access to s

Sun Aug 15, 2010 8:41 pm

Not new. Just different that earlier versions. This user API manual shows the command
/ip address print follow
as
/ip/address/print
=follow=
So if it does take print parameters (except detail and brief), that would mean
/queue/simple/print
=stats=
should be correct.

http://wiki.mikrotik.com/wiki/API_command_notes#Details
 
mcrose
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Wed May 06, 2009 8:00 pm

Re: 4.11 API bug: /queue/simple/print not giving access to s

Sun Aug 15, 2010 9:16 pm

Ah, as seperate words?

15/08/2010 13.13.58 - info 102 - EXECUTE= /queue/simple/print =stats= =.proplist=name,bytes,packets
15/08/2010 13.13.58 - DEBUG 11001 - 10.0.0.2 tr_mkrouter.msend /queue/simple/print
15/08/2010 13.13.58 - DEBUG 11001 - 10.0.0.2 tr_mkrouter.msend =stats=
15/08/2010 13.13.58 - DEBUG 11001 - 10.0.0.2 tr_mkrouter.msend =.proplist=name,bytes,packets
!re=name=foo=bytes=0/288=packets=0/6
!re=name=bar=bytes=0/0=packets=0/0
!re=name=baz=bytes=1140/0=packets=15/0

Time to get cracking. Thanks!
 
myazdian
newbie
Posts: 48
Joined: Sun Oct 16, 2011 3:06 pm

Re: 4.11 API bug: /queue/simple/print not giving access to s

Thu Oct 20, 2011 7:45 am

Hi all

I am vb.net programmer and I need to get target upload bytes and target download bytes for my users queue.

Please tips me to send this command to the rb750.

Thanks in advance.
M.Yazdian
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: 4.11 API bug: /queue/simple/print not giving access to s

Thu Oct 20, 2011 8:15 am

follow the same pattern as with other commands, you can look up what CLI command is returning your arguments.

Most probably same as previous guy found out:
/queue/simple/print
=stats=
or

/queue/simple/print
=detail=

you can limit with .proplist to what arguments to return.
 
myazdian
newbie
Posts: 48
Joined: Sun Oct 16, 2011 3:06 pm

Re: 4.11 API bug: /queue/simple/print not giving access to s

Thu Oct 20, 2011 11:07 am

Hi janisk

I need to get the users queue statistic.

I try this command

mik.Send("/queue/simple/print/=stats=.id=*8", True)

Butt get this Message:

!trap=message=no such command
!done
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: 4.11 API bug: /queue/simple/print not giving access to s

Thu Oct 20, 2011 3:06 pm

command is 2 lines, that means, you send 2 lines. please see documentation of API and of client you are trying to use.
 
myazdian
newbie
Posts: 48
Joined: Sun Oct 16, 2011 3:06 pm

Re: 4.11 API bug: /queue/simple/print not giving access to s

Tue Oct 25, 2011 8:12 am

Hi janisk
Thanks for tips.
janisk now I need to kick my pppoe active users and I tried this commands but this command is not working.

mik.send("/ppp/active/remove",false)
mik.send("=.id=*6FA")

Can you help me?
Thanks in advance
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: 4.11 API bug: /queue/simple/print not giving access to s

Tue Oct 25, 2011 12:39 pm

what was the response from router?
 
Percanta
newbie
Posts: 39
Joined: Tue Feb 24, 2009 1:00 am

Re: 4.11 API bug: /queue/simple/print not giving access to s

Fri Oct 28, 2011 11:54 pm

Good day
is it possible to get stats of queue with only read user?? even with write user u can not, so u'll need full access to get rate of simple queue :(

/queue/simple/print
=stats=
?name=somequeue
=.proplist=rate

v 5.7 x86
...not enough permissions...

v 5.7 rb411a it works sometimes !!!
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: 4.11 API bug: /queue/simple/print not giving access to s

Fri Oct 28, 2011 11:57 pm

Good day
is it possible to get stats of queue with only read user?? even with write user u can not, so u'll need full access to get rate of simple queue :(

/queue/simple/print
=stats=
?name=somequeue
=.proplist=rate

v 5.7 x86
...not enough permissions...

v 5.7 rb411a it works sometimes !!!
Maybe if you have "read", "sniff" and/or "test" privileges to that user?
 
Percanta
newbie
Posts: 39
Joined: Tue Feb 24, 2009 1:00 am

Re: 4.11 API bug: /queue/simple/print not giving access to s

Sat Oct 29, 2011 1:24 am

no, not even write user (same than full except by policy and ftp) :(

Who is online

Users browsing this forum: No registered users and 8 guests