Community discussions

MikroTik App
 
tvermoes
just joined
Topic Author
Posts: 10
Joined: Thu Mar 29, 2012 11:38 pm

API/CLI User details : HOWTO get uptime-used

Tue Mar 19, 2013 2:24 am

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.
 
User avatar
samir494
Member Candidate
Member Candidate
Posts: 236
Joined: Thu Aug 06, 2009 11:27 am
Location: India

Re: API/CLI User details : HOWTO get uptime-used

Tue Mar 19, 2013 6:37 am

dear

try this one, itsomewhat you need

ip hotspot user print value-list
 
tvermoes
just joined
Topic Author
Posts: 10
Joined: Thu Mar 29, 2012 11:38 pm

Re: API/CLI User details : HOWTO get uptime-used

Tue Mar 19, 2013 7:07 am

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.
 
tvermoes
just joined
Topic Author
Posts: 10
Joined: Thu Mar 29, 2012 11:38 pm

Re: API/CLI User details : HOWTO get uptime-used

Wed Mar 20, 2013 12:03 am

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.
 
User avatar
samir494
Member Candidate
Member Candidate
Posts: 236
Joined: Thu Aug 06, 2009 11:27 am
Location: India

Re: API/CLI User details : HOWTO get uptime-used

Thu Mar 21, 2013 12:23 pm

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] >
 
faghihsmh
just joined
Posts: 4
Joined: Fri Feb 15, 2013 7:56 pm

Re: API/CLI User details : HOWTO get uptime-used

Fri Nov 22, 2013 2:02 pm

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 ;]