Getting list of active users

Hi,

I would like to know, how can i get a list of active user in user-manager.

by active user i mean who are currently logged in. i am using PPTP with user-manager. i can get the total number of users from the following code

:put ([:len [/tool user-manager user find subscriber=mudasir]])

but i only want to get the total number of users who are online.

Hi mudasir

Try this:
:put [:len [/ip hotspot active find]]

EDIT: Oops. I see you are not using the hotspot. My bad…

Try
:put [:len [/ppp active find]]

Hi,

Dear SurferTim,

Thanks allot for your kind help. I am making a script that will change the active users rate-limit if the total number of users online are less then a particular number…