automatic change user package

I have Mikrotik RouterOS with several Hotspot user accounts. I have 10mbps connection. Users have 256kbps, 512kbps or 1Mbps. I put 2Mbps account for my self. Most of the time, not all user access the hotspot so it is possible to change my speed to 2.5Mbps or more. Is there a way to create user packet for myself to take the rest of the bandwidth. If all user acceess, I got 2Mbps but if one of the 1Mbps is not access, I get 3Mbps. If that 1Mbps user login, my speed limit drop again.

Edit:

another option is that if I have 30 users, when 0-10 users login, I get 4Mbps.
When 11-20 login, I get 3Mbps.
when 21-30 user login, I get 2Mbps.

You could set a script to execute on each user logon that basically checks # of current logins and:
Ex.
if logins 0 - 10 → set appropriate queue limits
if logins 11 - 20 → set appropriate queue limits
if logins 21 - 30 → set appropriate queue limits

You might also be able to do some math on the active connections with that same script.
Ex.
count the total # of users.
count active users
some percent of that per user → set appropriate queue limits

I’m not an expert on Queues by any means, so let me know if this sounds like it’ll work or improvements.

I am beginner in RouterOs so I don’t know how to do this. I want my user account speed limit to change depending on the number of user login

It might be easier to just bypass yourself in the Hotspot and to create a simple queue for yourself that has a lower priority. That way you always get whatever bandwidth is available after Hotspot customers have been satisfied.

namo,

Are you basically looking to spread the bandwidth evenly based on the amount of users connected to your Hotspot?
If this is the case, as fewi mentioned, there may be other ways to do this without scripting.

Unfortunately, I’m not expert at all in Queue management at all; this may be achieved by just using Queues alone.

I’m doing that now. I have my hotspot users set to a profile for their rate limit and on my hotspot login I left my user profile at default and I’m the only user with a default profile and what I noticed is that if all users are logged in, I get what’s left and no one is logged in I get all the bandwidth. Simple enough for me. You can try setting your hotspot profile to default as long as the default user profile has no rate limit set.

I use mine like this, because my clients come first and I’ll take what’s left if needed. You can give it a try or maybe someone else can chime in with more info…

but in this way if I download from fast link, wouldn’t I take the speed from other users? This did take other people speed.