Page 1 of 1

reset user counters in ROS V7.7 user manager

Posted: Mon Jan 23, 2023 11:49 pm
by keta
hello everyone.
I'm using ROS V7.7 on x86 and need to reset counters of all users in user manager.( counters including total download, total upload and etc)
found this code:
/user-manager user reset-counters
or:
/user-manager user reset-counters-all
but no luck.
is there any way to reset all users counters in user manager or for specific user(s) maybe?

Re: reset user counters in ROS V7.7 user manager  [SOLVED]

Posted: Sat Apr 01, 2023 2:29 pm
by keta
Hi.
I found the answer. for people who are short on attention like me.
ROS V7.7
when creating limitations on Usermanager>>Limitations>> add , there are reset counters interval and reset counters start time drop down lists. you can set your own values.

Re: reset user counters in ROS V7.7 user manager

Posted: Mon Jul 03, 2023 4:39 pm
by osxroot
Hi keta i’m using usermanager on mikrotik 7.10.1 and “reset counters” on Limitations seems doesn’t work, could you show me your working case?

Thanks

Re: reset user counters in ROS V7.7 user manager

Posted: Mon Dec 04, 2023 5:50 pm
by mistry7
Hi,

is there a solution for reset specific counters?

mistry7

Re: reset user counters in ROS V7.7 user manager

Posted: Mon Jul 29, 2024 11:34 am
by bpwl
Reset counters in "Limitations "does work. I could not find the counter values, but users are actually stopped by Profile Limitations until reset executes.
Reset execution is visible in the log.

These are NOT the counters in the Users TAB page !

Re: reset user counters in ROS V7.7 user manager

Posted: Mon Jul 29, 2024 11:45 am
by bpwl
Limit counters , hard deny, values not visible
Klembord2.jpg
But reset works
Klembord3.jpg

Re: reset user counters in ROS V7.7 user manager

Posted: Wed Jul 31, 2024 11:46 am
by bpwl
Number of active sessions per user goes wrong after some time. There are active sessions according to the USER tab information, but no active sessions in the SESSIONS tab.
No way to recalculate this field for the user in the database.
Why is "Active sessions" wrong, and why are "Active Sub Sessions" seemingly correct?

ROS User Manager is very strict in number of active sessions allowed per ROS license level E.G. (20, actually only 19, for license level 4, 50 for license level 5)
Too strict for a wifi implementation with RADIUS (User Manager). Users come with 4 to 5 devices each that just connect with wifi. So this is to support 4 connected users only with ROS license level 4.
RADIUS is used with as one central authentication with multiple AP.
Klembord2.jpg
The "Active sessions" counter can be found in the "UM.sqlite" database.
It should be possible to trigger a recount # of active sessions ... but don't find how to do it.
.
Klembord3.jpg

Re: reset user counters in ROS V7.7 user manager

Posted: Sat Aug 24, 2024 12:43 am
by bpwl
Limit counters (upload,download) that would stop the user are not "User" attributes or parameters, but seem to be "User Profiles" counters or parameters.
I have no idea how to display those "User Profiles" counters in the Winbox table.
You can give multiple "User Profiles" entries to some User. If the limit of the active Profile is reached, UM will start using the next "User Profiles" line for that User.

The only way I see to reset the user "Total" counters, is by delete en recreate of that user.
The hotspot login/logout pages and the "RouterOS-ip/UM" webpage for the user logging in, in User Manager both only show the same Total counters
To know how much quota is left for upload/download to the user, the "User Profiles" counters and limits are needed.


For more on multiple "User Profiles" lines and their use, see this excellent Mikrotik Tutorial from Mikrotik Indonesia (English subtitles) https://www.youtube.com/watch?v=GxNnQtN6fu8
The wifi PEAP authentication and accounting with Radius and the Hotspot with Radius are the same information, and are linked via RADIUS.

Re: reset user counters in ROS V7.7 user manager

Posted: Sat Aug 24, 2024 1:41 am
by bpwl
In terminal ...

/user-manager/user-profile>
-> try "print" (OK same obscurity as Winbox)
-> try "reset" and then one of the printed numbers

and get ...
error - contact MikroTik support and send a supout file (3)

A (new or extra) "User Profile" line cannot be activated when there are active sessions for that user. Activating a new profile for a user tries to stop the active sessions.
In the log there is: "Disconnecting all active sess fo" (Those phantom sessions however are not stopped)

EDIT: I might have found the origin of those "phantom sessions". If you delete a session in the User Manager session table that is still active, then the number of "Active sessions" under "Users" is not decremented. So that leaves an extra session in the counter.
Closing a session (what uses COA port 3799 to the NAS, what very often fails!) User manager gets a "Error NAK on closing session." from the NAS. And triggers:"Can't disconnect session. NAS not responding. Closing session anyway with reqId: nnn")

Re: reset user counters in ROS V7.7 user manager

Posted: Mon Sep 23, 2024 12:33 pm
by Wheelhousemarine
Hi.
I found the answer. for people who are short on attention like me.
ROS V7.7
when creating limitations on Usermanager>>Limitations>> add , there are reset counters interval and reset counters start time drop down lists. you can set your own values.
Hi, in monthly reset, do you know it will reset after 30 days or in 1st monthly?