Page 1 of 1
API/CLI User details : HOWTO get uptime-used
Posted: Tue Mar 19, 2013 2:24 am
by tvermoes
Have spent hours of reading with no success....
I need to get the value of uptime-used via cli/api.
Can anyone please give an example.
Re: API/CLI User details : HOWTO get uptime-used
Posted: Tue Mar 19, 2013 6:37 am
by samir494
dear
try this one, itsomewhat you need
ip hotspot user print value-list
Re: API/CLI User details : HOWTO get uptime-used
Posted: Tue Mar 19, 2013 7:07 am
by tvermoes
THX Samir.
tried :
tool user-manager user print value-list
On hotspot it works fine, but i use usermanager to manage my users.
tried allso :
tool user-manager user find (followed by TAB)
and there i see all the parameters i need to output, but not the values.
I was wondering if these parameters don't have a value until the value of them is > 0, and therefore is not shown...
I am working on a test router, with no users using it, so uptime-used will allways be 0.
Re: API/CLI User details : HOWTO get uptime-used
Posted: Wed Mar 20, 2013 12:03 am
by tvermoes
SOLVED:
when uptime-used is 0 it is not returned by the router/userman.
Tried to use some time on one of the test accounts, and that solved the problem.
Re: API/CLI User details : HOWTO get uptime-used
Posted: Thu Mar 21, 2013 12:23 pm
by samir494
hi,
try this one, its working for me
[admin@MikroTik] > tool user-manager user print where username=222
Flags: X - disabled, A - active, I - incomplete
2 customer=admin name="222" actual-profile="256k" password="222"
shared-users=1 wireless-psk="" wireless-enc-key=""
wireless-enc-algo=none uptime-used=1w20m40s download-used=746277624
upload-used=140307485 last-seen=mar/21/2013 15:47:28 active-sessions=1
[admin@MikroTik] >
Re: API/CLI User details : HOWTO get uptime-used
Posted: Fri Nov 22, 2013 2:02 pm
by faghihsmh
hi you can write the following command on new terminal
note that the username is the name of your user
put [/tool user-manager user get username download-used ;]