How to enable SQM using SSH uci command line

I want to create a Windows shortcut for enabling SQM when i want to play a online game and disable it with two clicks afterwards. Its is possible with putty and creating a shortcut to automatically enter my password and execute a command. But i dont know what command to use for enabling SQM. Can someone help me please?

edit

uci set sqm.@queue[0].enabled='1'
root@OpenWrt:~# /etc/init.d/sqm restart
SQM: Starting SQM script: piece_of_cake.qos on wan, in: 23000 Kbps, out: 1700 Kbps
SQM: piece_of_cake.qos was started on wan successfully
root@OpenWrt:~# uci set sqm.@queue[0].enabled='0'
root@OpenWrt:~# /etc/init.d/sqm restart
SQM: Stopping SQM on wan

You could keep the box checked. But stop and start the service

/etc/init.d/sqm start
/etc/init.d/sqm stop
/etc/init.d/sqm enable
... enabled
....start
...stop
etc
1 Like

Alternatively:

uci set sqm.wan.enabled='1'

Then I think you need to

/etc/init.d/sqm restart

1 Like

Question, why not run sqm all of the time? Then you do not need to worry? Assuming your router is powerful enough, for sqm in the first place. I think a lot of users are satisfied with sqm always-on, it is not only games that profit from lower-average latency and a competent scheduler, even mundane things like browsing while someone else does video streaming/bulk data downloads or VoIP/video conferencing often are more robust, reliable and useful with competent AQM like sqm offers

Because 10% will not matter one way or the other (you can measure that but you are unlikely to be able detect whether you are on SQM or not if you just experience a download, after all it is not guaranteed that the servers will actually deliver at full rate anyway). But if you must, just keep sqm on by default and selectively disable it when you do bulk transfers where every second counts...

I am hardly unbiased here, but on my then 100/30 Mbps link I traffic shaoed with sqm down to 49/29 as that was the maximum my router allowed. I tested both 100/30 without sqm and 49/29 with sqm and with sqm won hands down. However I do not actually download large amounts of data with tight time limits, so that is a use case that has little importance to me, compared to having decent responsiveness even with larger (but not time-critical) data transfers "in the background". I am not saying you will come to the same conclusion, but maybe give it a try?

As you posted in edit but don't forget to add uci commit in end

uci set sqm.@queue[0].enabled='0' //disable first instance
uci set sqm.@queue[1].enabled='1' //enable second instance with different parameters
uci commit
service sqm restart
1 Like