Community discussions

MikroTik App
 
keta
just joined
Topic Author
Posts: 2
Joined: Mon Jan 23, 2023 11:25 pm

reset user counters in ROS V7.7 user manager

Mon Jan 23, 2023 11:49 pm

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?
 
keta
just joined
Topic Author
Posts: 2
Joined: Mon Jan 23, 2023 11:25 pm

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

Sat Apr 01, 2023 2:29 pm

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.
 
User avatar
osxroot
just joined
Posts: 2
Joined: Mon Jul 03, 2023 4:33 pm
Contact:

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

Mon Jul 03, 2023 4:39 pm

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
 
mistry7
Forum Guru
Forum Guru
Posts: 1480
Joined: Tue Oct 13, 2009 11:57 am
Location: Germany

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

Mon Dec 04, 2023 5:50 pm

Hi,

is there a solution for reset specific counters?

mistry7
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 3094
Joined: Mon Apr 08, 2019 1:16 am

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

Mon Jul 29, 2024 11:34 am

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 !
Last edited by bpwl on Mon Jul 29, 2024 11:47 am, edited 1 time in total.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 3094
Joined: Mon Apr 08, 2019 1:16 am

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

Mon Jul 29, 2024 11:45 am

Limit counters , hard deny, values not visible
Klembord2.jpg
But reset works
Klembord3.jpg
You do not have the required permissions to view the files attached to this post.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 3094
Joined: Mon Apr 08, 2019 1:16 am

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

Wed Jul 31, 2024 11:46 am

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
You do not have the required permissions to view the files attached to this post.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 3094
Joined: Mon Apr 08, 2019 1:16 am

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

Sat Aug 24, 2024 12:43 am

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.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 3094
Joined: Mon Apr 08, 2019 1:16 am

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

Sat Aug 24, 2024 1:41 am

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")
 
Wheelhousemarine
just joined
Posts: 10
Joined: Thu Sep 19, 2024 5:20 pm

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

Mon Sep 23, 2024 12:33 pm

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?

Who is online

Users browsing this forum: No registered users and 8 guests