hi, i get download and upload since sessions in the usermanager, the problem is know not the difference between Sessions and (numer) A Session" Option.
i need delete all Session for restart the upload and download
and wich is the different.
The label “A sessions” is short for “Active sessions”. Basically, users that are currently logged in, and actively using their connection.
The label “Sessions” refers to available sessions… Meaning that if that particular user tries to login at this time, they’d get the profile seen in there.
Sessions are separate from profiles, because a profile tells you a general template (e.g. the profile “profile1” specifies a rate limit 10M/2M for 30 days since the first login), whereas an available session tells what templates are available to a user (e.g. two instances of “profile1” for this user), particularly useful when users pre-order their offer (e.g. pay you for two months in advance) or if they switch profiles (so in the end, they’d have their current instance of “profile1”, with their next profile being “profile2”).
This will remove all available, as well as all active sessions. Again, keep in mind that this includes advance payments… Your users are likely going to be pissed off with you.
You can remove specific sessions by fine tuning the “find” part in the command above. So for example, to remove all “active” sessions only, but allow users to use other sessions they have assigned to them, you can use
/tool user-manager session remove [find where active=yes]
or conversely, if you want to remove all “extra” sessions, but ensure logged in users stay logged in until their time is up, replace the “yes” above with “no”.
Doing the same with my PHP API client is analogous:
<?php
use PEAR2\Net\RouterOS;
require_once 'PEAR2_Net_RouterOS-1.0.0b5.phar';
$util = new RouterOS\Util($client = new RouterOS\Client('192.168.88.1', 'admin', 'password'));
$util->setMenu('/tool user-manager session')->remove($util->find(RouterOS\Query::where('active', 'yes')));
Did it complete though, or did you stopped it? Stopping it restores anything that might’ve been deleted.
With so many sessions, it’s not surprising that it takes so long…
I think you may have already reached a critical point, where it would be faster if you instead backup the rest of your User Manager database, then remove the database file, rebuild the database (based on a new empty file), and restore from your backup the rest of the things.
The effect will be exactly the same as removing all sessions, but should ultimately happen in minutes, rather than hours, unless perhaps you also have 746000 users/profiles/limitations/routers.
It is over correctly, but did not eliminate the sessions are marked in yellow, if you have deleted me active, have executed to remove both active and inactive
i have 1000 clients in the usermanger approximately
It’s possible that with the API, you might need to use “true” instead of “yes”, and “false” instead of “no”… I haven’t tried removing specific items from that particular menu (and I don’t currently have a router with User Manager to try it on…).
From terminal though, the aforementioned
/tool user-manager session remove [find where active=yes]
or
/tool user-manager session remove [find where active=no]