What's new

AutoBW: Automatically set QoS bandwidth using spdMerlin

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

It has to do with picking out the units (b, Kbps, Mbps, etc) for the class ceil/rates. What does tc class show dev br0 | grep "parent 1:1" output?

I see this:
Code:
class htb 1:11 parent 1:1 leaf 11: prio 1 rate 1670Kbit overhead 18 ceil 8379Kbit burst 3197b cburst 9595b
class htb 1:10 parent 1:1 leaf 10: prio 0 rate 417Kbit overhead 18 ceil 8379Kbit burst 3197b cburst 9595b
class htb 1:13 parent 1:1 leaf 13: prio 3 rate 417Kbit overhead 18 ceil 8379Kbit burst 3197b cburst 9595b
class htb 1:12 parent 1:1 leaf 12: prio 2 rate 835Kbit overhead 18 ceil 8379Kbit burst 3197b cburst 9595b
class htb 1:15 parent 1:1 leaf 15: prio 5 rate 246Kbit overhead 18 ceil 8379Kbit burst 3198b cburst 9595b
class htb 1:14 parent 1:1 leaf 14: prio 4 rate 331Kbit overhead 18 ceil 8379Kbit burst 3197b cburst 9595b
class htb 1:17 parent 1:1 leaf 17: prio 7 rate 77Kbit overhead 18 ceil 8379Kbit burst 3198b cburst 9595b
class htb 1:16 parent 1:1 leaf 16: prio 6 rate 161Kbit overhead 18 ceil 8379Kbit burst 3197b cburst 9595b
 
Code:
curl "https://raw.githubusercontent.com/squidbillyms/AutoBW/development/AutoBW" -o /jffs/scripts/AutoBW && chmod 755 AutoBW
Might need 'dos2unix AutoBW'
There is lots of new code, so it will need lots of testing ;) I tried to test the best I could but you know how that goes.
In addition to options in the config file, AutoBW can now be run with command-line arguments like:
AutoBW -sim (simulation mode; do not change anything but simulate what would happen)
AutoBW -num_tests 3 (average speeds over 3 spdMerlin tests; set QoS upload/download bandwidth)
AutoBW -read_bw -num_tests 10 (read in the last 10 spdMerlin tests from daily csv files and calculate average values; set QoS upload/download bandwidth)
and so on ....
Try AutoBW -help for all the options (it can still be run without any options; the options are pulled in from the AutoBW config file)

I tried installing v2.0. It install with no issues, however, when I try to run the command: /jffs/scripts/AutoBW, i get this:

Checking prerequisites:
[ X ] AsusWRT-Merlin version checked!
[ X ] bc installed
[ X ] spdMerlin is available.
[ X ] spdMerlin is >=3.3.2
[ X ] spdMerlin is not currently running.
[ X ] spdMerlin Stats found
[ X ] Adaptive QOS Enabled
[ X ] ERROR: AutoBW config file not found
Run AutoBW -config first
Please correct the errors above and retry.
 
I tried installing v2.0. It install with no issues, however, when I try to run the command: /jffs/scripts/AutoBW, i get this:

Checking prerequisites:
[ X ] AsusWRT-Merlin version checked!
[ X ] bc installed
[ X ] spdMerlin is available.
[ X ] spdMerlin is >=3.3.2
[ X ] spdMerlin is not currently running.
[ X ] spdMerlin Stats found
[ X ] Adaptive QOS Enabled
[ X ] ERROR: AutoBW config file not found
Run AutoBW -config first
Please correct the errors above and retry.


run below to generate default config file and it should run ok next time
AutoBW -config

config file can be found/edited here
/jffs/addons/AutoBW/config
 
run below to generate default config file and it should run ok next time
AutoBW -config

config file can be found/edited here
/jffs/addons/AutoBW/config

When I try to run the AutoBW -config

I get AutoBW: not found.
 
I see this:
Code:
class htb 1:11 parent 1:1 leaf 11: prio 1 rate 1670Kbit overhead 18 ceil 8379Kbit burst 3197b cburst 9595b
class htb 1:10 parent 1:1 leaf 10: prio 0 rate 417Kbit overhead 18 ceil 8379Kbit burst 3197b cburst 9595b
class htb 1:13 parent 1:1 leaf 13: prio 3 rate 417Kbit overhead 18 ceil 8379Kbit burst 3197b cburst 9595b
class htb 1:12 parent 1:1 leaf 12: prio 2 rate 835Kbit overhead 18 ceil 8379Kbit burst 3197b cburst 9595b
class htb 1:15 parent 1:1 leaf 15: prio 5 rate 246Kbit overhead 18 ceil 8379Kbit burst 3198b cburst 9595b
class htb 1:14 parent 1:1 leaf 14: prio 4 rate 331Kbit overhead 18 ceil 8379Kbit burst 3197b cburst 9595b
class htb 1:17 parent 1:1 leaf 17: prio 7 rate 77Kbit overhead 18 ceil 8379Kbit burst 3198b cburst 9595b
class htb 1:16 parent 1:1 leaf 16: prio 6 rate 161Kbit overhead 18 ceil 8379Kbit burst 3197b cburst 9595b
Ok, I see the problem. You have an "overhead" section that I do not so it is unable to find rate unit of Kbit ... will fix and update soon.

UPDATE:
Changes merged to the development branch that should fix your issue (I think).
 
Last edited:
Are you in the same directory? then ./AutoBW
Otherwise you need to include the path to AutoBW (like /jffs/scripts/AutoBW)
Yes, I can see the AutoBW script under the directory i.e. /jffs/scripts/AutoBW

When I go back to the previous version (1.5), the script runs with no issues.
 
Ok, I see the problem. You have an "overhead" section that I do not so it is unable to find ceil unit of Kbit ... will fix and update soon.

thanks and for reference, I have an RT-AC86U
 
I am having the same issue.

Running a 600/600Mbps PPPoE fiber connection under a RT-AX88U. QOS and FreshJR script enabled (90% bandwidth limit fixed)

When I run the speedtest with my PC directly connected to the router I got around 560/560Mbps (withQOS disabled I got around 620/620Mbps). That's Ok. But when I ran the spdMerlin script ... I didn't get any test result higher than 350/350Mbps, even with QOS disabled.

I don't know why the speed tests directly from the router are too low.
That is close to what I am getting... 350 to 400(the highest I have seen)
 
That is close to what I am getting... 350 to 400(the highest I have seen)
Are you sure you are connecting to the same Ookla server between the speedtest on your PC and the router (just a thought).

Also,
Just pushed an update to the development branch which should correctly pick out the rate/ceil units from tc (traffic control). If it cannot find them (for some reason), AutoBW will tell you so. These same units are then used with the tc command to update the rates/ceils of each class.
 
Ok, I see the problem. You have an "overhead" section that I do not so it is unable to find ceil unit of Kbit ... will fix and update soon.

UPDATE:
Changes merged to the development branch that should fix your issue (I think).

I ran below but no change,did I miss something?
Code:
curl "https://raw.githubusercontent.com/squidbillyms/AutoBW/development/AutoBW" -o /jffs/scripts/AutoBW && chmod 755 AutoBW

./AutoBW
 
Ok, I get this error message when trying to run AutoBW:

Checking for update ...
WARNING: This version is v2.0
WARNING: Latest version is v1.5
WARNING: The file hashes don't match.
--------------- SPDMERLIN --------------
Download (Kbps) Upload (Kbps)
------------------- -------------------
Test 1 of 3 365772.8 11294.7
Test 2 of 3 366950.4 11561.0
Test 3 of 3 288092.2 11909.1
Average 340271.8 11588.3
Scale Factors 0.90 0.90
Scaled Speeds 306244.6 10429.4
*Download Speed (306244.6 Kbps) > upper limit (102400.0 Kbps)
Corrected Speeds 102400.0 10429.4
----------------- QOS -----------------
Download (Kbps) Upload (Kbps)
----------------- -----------------
Previous 102400.0 10053.0
New (from above) 102400.0 10429.4
Scaling by 1.000 1.037
====================================== DOWNLOAD ======================================
----------------- RATE ----------------- ----------------- CEIL -----------------
Class Previous New Previous New
----- ------------------- ------------------- ------------------- -------------------
ERROR: Did not recognize TC rate unit: Kbit overhead
 
Ok, I get this error message when trying to run AutoBW:

Checking for update ...
WARNING: This version is v2.0
WARNING: Latest version is v1.5
WARNING: The file hashes don't match.
--------------- SPDMERLIN --------------
Download (Kbps) Upload (Kbps)
------------------- -------------------
Test 1 of 3 365772.8 11294.7
Test 2 of 3 366950.4 11561.0
Test 3 of 3 288092.2 11909.1
Average 340271.8 11588.3
Scale Factors 0.90 0.90
Scaled Speeds 306244.6 10429.4
*Download Speed (306244.6 Kbps) > upper limit (102400.0 Kbps)
Corrected Speeds 102400.0 10429.4
----------------- QOS -----------------
Download (Kbps) Upload (Kbps)
----------------- -----------------
Previous 102400.0 10053.0
New (from above) 102400.0 10429.4
Scaling by 1.000 1.037
====================================== DOWNLOAD ======================================
----------------- RATE ----------------- ----------------- CEIL -----------------
Class Previous New Previous New
----- ------------------- ------------------- ------------------- -------------------
ERROR: Did not recognize TC rate unit: Kbit overhead
Sorry. Please pull down a fresh copy from development and try it again.
 
Last edited:
I ran below but no change,did I miss something?
Code:
curl "https://raw.githubusercontent.com/squidbillyms/AutoBW/development/AutoBW" -o /jffs/scripts/AutoBW && chmod 755 AutoBW

./AutoBW
Weird ... the updates are there in the development branch script. Are you sure you are executing the updated version you downloaded?
 
Weird ... the updates are there in the development branch script. Are you sure you are executing the updated version you downloaded?

weird, just redid what I did before, (e.g. I previously checked timestamps updated as they did just now), and it now completes ok o_O
Code:
# ls -lh AutoBW
...       40.5K Apr  9 20:35 AutoBW

# curl "https://raw.githubusercontent.com/squidbillyms/AutoBW/development/AutoBW" -o /jffs/scripts/AutoBW && chmod 755 AutoBW
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 41481  100 41481    0     0   135k      0 --:--:-- --:--:-- --:--:--  152k

# ls -lh AutoBW
 ...      40.5K Apr  9 21:03 AutoBW

# ./AutoBW

e.g.
Code:
              ====================================== DOWNLOAD ======================================
               ----------------- RATE -----------------    ----------------- CEIL -----------------
Class               Previous                New                 Previous                New
-----          -------------------  -------------------    -------------------  -------------------
11                19416.0 Kbit          19416.1 Kbit          97096.0 Kbit          97096.5 Kbit
10                 4848.0 Kbit           4848.0 Kbit          97096.0 Kbit          97096.5 Kbit
13                 4848.0 Kbit           4848.0 Kbit          97096.0 Kbit          97096.5 Kbit
12                 9704.0 Kbit           9704.0 Kbit          97096.0 Kbit          97096.5 Kbit
15                 2912.0 Kbit           2912.0 Kbit          97096.0 Kbit          97096.5 Kbit
14                 3880.0 Kbit           3880.0 Kbit          97096.0 Kbit          97096.5 Kbit
17                  968.0 Kbit            968.0 Kbit          97096.0 Kbit          97096.5 Kbit
16                 1936.0 Kbit           1936.0 Kbit          97096.0 Kbit          97096.5 Kbit
              ======================================= UPLOAD =======================================
               ----------------- RATE -----------------    ----------------- CEIL -----------------
Class               Previous                New                 Previous                New
-----          -------------------  -------------------    -------------------  -------------------
11                 1744.0 Kbit           1737.1 Kbit           8720.0 Kbit           8685.4 Kbit
10                  432.0 Kbit            430.3 Kbit           8720.0 Kbit           8685.4 Kbit
13                  432.0 Kbit            430.3 Kbit           8720.0 Kbit           8685.4 Kbit
12                  872.0 Kbit            868.5 Kbit           8720.0 Kbit           8685.4 Kbit
15                  256.0 Kbit            255.0 Kbit           8720.0 Kbit           8685.4 Kbit
14                  344.0 Kbit            342.6 Kbit           8720.0 Kbit           8685.4 Kbit
17                   80.0 Kbit             79.7 Kbit           8720.0 Kbit           8685.4 Kbit
16                  168.0 Kbit            167.3 Kbit           8720.0 Kbit           8685.4 Kbit
Thanks :)
 
*Download Speed (306244.6 Kbps) > upper limit (102400.0 Kbps)
Also, Kingp1n, you probably wanna increase your download speed upper limit in the config file (/jffs/addons/AutoBW/config) ... you are getting 300 MBps down but have the upper limit set to 100 Mbps (that is unless you intend to cap it for some reason). Alternatively, you can use the command line like AutoBW -dl_limits 1 400 (which ensures download bandwidth is set no lower than 1 Mbps and no higher than 400 Mbps)

Update:
I increased the default upper limits (in config file) to 500 Mbps (cause some of y'all got much faster internet than me :))
 
Last edited:

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top