Community discussions

MikroTik App
 
realtimemedia
just joined
Topic Author
Posts: 7
Joined: Mon Jul 25, 2022 9:59 am

User Manager 5

Mon Jul 25, 2022 11:11 am

There is a CRS328-24P-4S+ (arm) v7.4, on which the User Manager 5 is configured. But it stopped working because, out of disk space. How can I clear the database of old sessions? Can a flash drive be used to store a database?
 
realtimemedia
just joined
Topic Author
Posts: 7
Joined: Mon Jul 25, 2022 9:59 am

Re: User Manager 5

Tue Jul 26, 2022 12:47 pm

user-manager/database/optimize-db
Optimizing database...
Failed to optimize database
action timed out - try again, if error continues contact MikroTik support and send
a supout file (13)
 
User avatar
chechito
Forum Guru
Forum Guru
Posts: 2990
Joined: Sun Aug 24, 2014 3:14 am
Location: Bogota Colombia
Contact:

Re: User Manager 5

Tue Jul 26, 2022 3:09 pm

bad idea running user manager on a switch
 
realtimemedia
just joined
Topic Author
Posts: 7
Joined: Mon Jul 25, 2022 9:59 am

Re: User Manager 5

Thu Jul 28, 2022 7:11 am

I answer myself
:foreach i in=[/user-manager/session/find] do { /user-manager/session/remove $i; }
/user-manager/database/optimize-db
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: User Manager 5  [SOLVED]

Thu Jul 28, 2022 3:16 pm

:foreach i in=[/user-manager/session/find] do { /user-manager/session/remove $i; }
=
/user-manager/session remove [find]
 
realtimemedia
just joined
Topic Author
Posts: 7
Joined: Mon Jul 25, 2022 9:59 am

Re: User Manager 5

Fri Jul 29, 2022 9:59 am

:foreach i in=[/user-manager/session/find] do { /user-manager/session/remove $i; }
=
/user-manager/session remove [find]
What would this line look like then?
:foreach i in=[/user-manager/session/find terminate-cause=lost-service] do { /user-manager/session/remove $i; }
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: User Manager 5

Fri Jul 29, 2022 11:31 am

/user-manager/session remove [find where terminate-cause=lost-service]
 
mada3k
Long time Member
Long time Member
Posts: 687
Joined: Mon Jul 13, 2015 10:53 am
Location: Sweden

Re: User Manager 5

Fri Jul 29, 2022 12:21 pm

bad idea running user manager on a switch
Agree

That's the issue with many users of RouteROS. When everything's possible, then it's suddenly possible to do stupid things, and then you run into problems.
 
realtimemedia
just joined
Topic Author
Posts: 7
Joined: Mon Jul 25, 2022 9:59 am

Re: User Manager 5

Thu Aug 04, 2022 7:58 am

Final version
/user-manager/session/remove [find where active=no]
/user-manager/database/optimize-db

Who is online

Users browsing this forum: Amazon [Bot], EmuAGR and 77 guests