QoSmate: (Yet Another) Quality of Service Tool for OpenWrt

every time my router starts qosmate is disabled, this is normal hudra.

image

Check if you have all packages installed, its the main reason, in every restart if script detect that you dont have some kmods, he will try to install them and if during this process you change something in script, it will be disabled.

1 Like

I think it depends on whether it's just a simple AP or another router with a separate (NATed) network. Based on your screenshot, it seems like the AP is just a dumb AP.

Could you clarify your goal here? Are you trying to deprioritize all devices connected to the AP or all LAN devices in general, and if so, why?

Also, keep in mind that when using CS2 with HFSC, marked traffic will be deprioritized to low priority (1:14), which is what you're aiming for. However, if you switch to using CAKE as the root qdisc, the traffic will be prioritized instead. In CAKE (at least with diffserv4), CS2 traffic falls into the video tin, which means it will be prioritized.

I think I should add more DSCP values to the HFSC priority map to maintain consistent prioritization across different qdiscs. I'll look into that.

Thanks, appreciate it!

2 Likes

Could you please describe in more detail what exactly isn't working? What errors are you encountering, and what specifically is failing? Simply saying "it's not working with IPv6" isn't very helpful in this case.

Regarding this issue. Please check what @di_Niko suggested and can you also perform a test for me:

  1. Restart your router
  2. When the router is rebooted wait 2-3 more minutes
  3. Then show me the whole ouptut of:
logread | grep qosmate
  1. Then show me the output of
service qosmate restart

and

service qosmate status
1 Like

As is, it is an AP mode wifi router. As you see in the screenshot, all those connected to this AP. I intend for them to have low priority. And I use HFSC. I avoid using CAKE so that it does not consume a lot of processor from the main router.

The idea is that everyone who connects to the AP 192.168.0.126
Don't consume so much priority. The IPs you see in the rule called LOW-CS2. They are devices connected to this AP. (smart TV, cell phones, notebook, etc.)
I don't know if I'm good at doing this. But I wanted you to confirm that I do assign the CS2 class to the AP. All connected are in the Low priority lane.

But why? Why do you believe that will help you? Have you read the following:

So I would also deprioritize only if needed...

I just wanted to clarify...

You said:

So, I guess your priority is gaming. If you use HFSC and ensure that the important gaming traffic is assigned to the High Priority [Realtime] (1:11) class, you won't need to deprioritize all other traffic. The default class should handle the majority of the traffic pretty good.

2 Likes

To make sure that all the traffic that the AP emits. Have low priority CS2, I just wanted to make sure this is true.

Seeing this comment, I understand that any device I connect to my main Router. Ends on Normal (1:13) CS0. But pay attention to what you recommend. Just prioritize my PC and the rest stay all in CS0.

I'm excited to announce that I've created a new "Connections" tab for QoSmate, similar to the one found in OpenWrt under realtime graphs/connections. This feature is not yet part of the official version, but I'm looking for testers who can provide feedback. If it proves stable and valuable to users, I plan to incorporate it into the official release.

Key Features of the New Connections Tab:

  1. Leverages conntrack data: It reads DSCP values and other information like protocol, source and destination IPs, bytes, and packets sent for each connection.
  2. Real-time calculations: The tab displays average packets per second, max packets per second, and average kbit/s. These calculations are based on data from the last 10 seconds, providing a good approximation of current network activity.
  3. Sorting and Filtering: Users can sort and filter the connections table. For example, to view all active connections marked with CS5, simply enter "cs5" in the filter field.
  4. Game Analysis: It can be used to analyze game network behavior. For instance, to check the tickrate of Call of Duty: Warzone, filter by port 3074 and sort descending by Avg PPS. Join a game, and the Avg PPS should give you an approximation of the game's tickrate. (Note: This comparison is most accurate for games that don't use sub-tickrate systems like CS2, which sends multiple packets per tick.)

How to Install and Test:

opkg update && opkg install luci-lib-jsonc lua && \
mkdir -p /www/luci-static/resources/view/qosmate /usr/share/luci/menu.d /usr/share/rpcd/acl.d /usr/libexec/rpcd && \
wget -O /www/luci-static/resources/view/qosmate/settings.js https://raw.githubusercontent.com/hudra0/luci-app-qosmate/main/htdocs/luci-static/resources/view/settings.js && \
wget -O /www/luci-static/resources/view/qosmate/hfsc.js https://raw.githubusercontent.com/hudra0/luci-app-qosmate/main/htdocs/luci-static/resources/view/hfsc.js && \
wget -O /www/luci-static/resources/view/qosmate/cake.js https://raw.githubusercontent.com/hudra0/luci-app-qosmate/main/htdocs/luci-static/resources/view/cake.js && \
wget -O /www/luci-static/resources/view/qosmate/advanced.js https://raw.githubusercontent.com/hudra0/luci-app-qosmate/main/htdocs/luci-static/resources/view/advanced.js && \
wget -O /www/luci-static/resources/view/qosmate/rules.js https://raw.githubusercontent.com/hudra0/luci-app-qosmate/main/htdocs/luci-static/resources/view/rules.js && \
wget -O /www/luci-static/resources/view/qosmate/connections.js https://raw.githubusercontent.com/hudra0/luci-app-qosmate/main/dev/connections.js && \
wget -O /usr/libexec/rpcd/luci.qosmate https://raw.githubusercontent.com/hudra0/luci-app-qosmate/main/dev/luci.qosmate && \
wget -O /usr/share/luci/menu.d/luci-app-qosmate.json https://raw.githubusercontent.com/hudra0/luci-app-qosmate/main/dev/menu.d/luci-app-qosmate.json && \
wget -O /usr/share/rpcd/acl.d/luci-app-qosmate.json https://raw.githubusercontent.com/hudra0/luci-app-qosmate/main/dev/luci-app-qosmate.json && \
chmod +x /usr/libexec/rpcd/luci.qosmate && \
/etc/init.d/rpcd restart && \
/etc/init.d/uhttpd restart

Please note that this feature is still experimental. While the core functionality should be working, there might be some bugs or areas for improvement.

If you encounter any issues, have suggestions for improvements, or find this feature particularly useful, please let me know. Your input will help determine whether this becomes a permanent part of QoSmate.

Here is a screenshot of th UI:

9 Likes

Hydra, one question, this connections will inform everything that is running on our connection or just the IP that we prioritize in.

Hi I wanted to try out your new connections tab but after installing and clicking on 'Connections' I get this message
" RPCError

RPC call to luci.qosmate/getConntrackDSCP failed with error -32000: Object not found at ClassConstructor.handleCallReply (https://192.168.1.1/luci-static/resources/rpc.js?v=git-24.086.45142-09d5a38:11:3)"

I'm on OpenWrt 23.05.4

Just try it out :wink: But seriously it should contain every connection in the conntrack table.

Do you get any errors when installing the new tab with the command i provided? Just run the one-liner again and show me the whole output.

Also please show me the output of:

opkg list-installed | grep luci-lib-jsonc

and

opkg list-installed | grep luci*

Have you also tried clearing your browser cache?

@Hudra - Same error message

root@ImmortalWrt:~# opkg list-installed | grep luci-lib-jsonc
luci-lib-jsonc - 24.079.46156~c1e3fa9

root@ImmortalWrt:~# opkg list-installed | grep luci*
liblucihttp-ucode - 2023.03.15~9b5b683f-r1
liblucihttp0 - 2023.03.15~9b5b683f-r1
luci - 23.051.66410~a505bb1
luci-app-adblock - 24.224.27442~06037ad
luci-app-cpufreq - 24.044.22536~7b95d73
luci-app-firewall - 24.169.32051~743a7c6
luci-app-opkg - 24.191.51591~bff2a43
luci-app-upnp - 24.148.86114~d174bb8
luci-base - 24.222.22847~fbe46d7
luci-lib-jsonc - 24.079.46156~c1e3fa9
luci-light - 23.024.33244~34dee82
luci-mod-admin-full - 19.253.48496~3f93650
luci-mod-network - 24.209.33969~31219a4
luci-mod-status - 24.209.33969~31219a4
luci-mod-system - 24.169.32051~743a7c6
luci-proto-ipv6 - 24.148.86114~fbbfdb4
luci-proto-ppp - 24.148.86114~fbbfdb4
luci-theme-bootstrap - 24.191.51591~991549c
rpcd-mod-luci - 20240305-r1

No error messages on install, and cleared broweser cache.

Mmh strange...

What happens when you enter:

ubus call luci.qosmate getConntrackDSCP

... you don't need to show me the entire output of this command, and please ensure that any sensitive information is redacted.

lua /usr/libexec/rpcd/luci.qosmate
root@ImmortalWrt:~# ubus call luci.qosmate getConntrackDSCP
Command failed: Not found

root@ImmortalWrt:~# lua /usr/libexec/rpcd/luci.qosmate
-ash: lua: not found

Alright thanks.

And now please:

ls -l /usr/libexec/rpcd

-rwxr-xr-x 1 root root 2404 Aug 22 06:59 luci.qosmate

root@ImmortalWrt:~# ls -l /usr/libexec/rpcd
-rwxr-xr-x    1 root     root          2404 Aug 22 09:00 luci.qosmate

The script file (Lua file) is present, but it seems like it can't be executed. This is likely because Lua is missing.

What's the output of:

opkg list-installed | grep lua

yea lua was missing for me and when I rebooted the router everything seems to work fine

1 Like