Skip to content
Snippets Groups Projects
Commit 1c79b8f9 authored by Sukru Senli's avatar Sukru Senli
Browse files

update README

parent 1158dbb8
Branches
No related tags found
No related merge requests found
Pipeline #17343 passed
QoS Manager # QoS Manager
====
This program implements methods provided by the `qos` object on U-Bus. This is done by calling `libqos` provided by `easy-soc-libs`. This program implements methods provided by the `qos` object on U-Bus. This is done by calling `libqos` provided by `easy-soc-libs`.
...@@ -7,7 +6,7 @@ This program implements methods provided by the `qos` object on U-Bus. This is d ...@@ -7,7 +6,7 @@ This program implements methods provided by the `qos` object on U-Bus. This is d
qosmngr requires a configuration file provide objects over ubus. The configuration file is an uci file `/etc/config/qos`. Sample configuration file is provided below. qosmngr requires a configuration file provide objects over ubus. The configuration file is an uci file `/etc/config/qos`. Sample configuration file is provided below.
````bash ```
config queue 'q_0_eth1' config queue 'q_0_eth1'
option enable '1' option enable '1'
option ifname 'eth1' option ifname 'eth1'
...@@ -413,27 +412,27 @@ config policer ...@@ -413,27 +412,27 @@ config policer
option meter_type '0' option meter_type '0'
option name 'cfg2b6c73' option name 'cfg2b6c73'
```` ```
## Ubus API ## uBus API
`ubusd` has to be running all time, as it exposes the qos functionality over ubus. By default,qosmngr registers below namespace with ubus. `ubusd` has to be running all time, as it exposes the qos functionality over ubus. By default,qosmngr registers below namespace with ubus.
````bash ```
root@iopsys:~# ubus -v list | grep qos root@iopsys:~# ubus -v list | grep qos
'qos' @e1f3b458 'qos' @e1f3b458
root@iopsys:~# root@iopsys:~#
```` ```
````bash ```
root@iopsys:~# ubus -v list qos root@iopsys:~# ubus -v list qos
'qos' @e1f3b458 'qos' @e1f3b458
"queue_stats":{"ifname":"String","qid":"String"} "queue_stats":{"ifname":"String","qid":"String"}
"reload":{"section":"String"} "reload":{"section":"String"}
root@iopsys:~# root@iopsys:~#
```` ```
````bash ```
root@iopsys:~# root@iopsys:~#
root@iopsys:~# ubus -S call qos reload root@iopsys:~# ubus -S call qos reload
root@iopsys:~# root@iopsys:~#
...@@ -445,14 +444,14 @@ root@iopsys:~# ubus -S call qos reload '{"section":"policer"}' ...@@ -445,14 +444,14 @@ root@iopsys:~# ubus -S call qos reload '{"section":"policer"}'
root@iopsys:~# root@iopsys:~#
root@iopsys:~# ubus -S call qos reload '{"section":"shaper"}' root@iopsys:~# ubus -S call qos reload '{"section":"shaper"}'
root@iopsys:~# root@iopsys:~#
```` ```
- `queue_stats : {"ifname":"String","qid":"Integer"}` - `queue_stats : {"ifname":"String","qid":"Integer"}`
- `ifname`: interface name for which we want to get the QoS statistics. Optional argument: if not provided, the statistics of all ports for all queues are returned. - `ifname`: interface name for which we want to get the QoS statistics. Optional argument: if not provided, the statistics of all ports for all queues are returned.
- `qid`: the TX queue ID for which we want to get the statistics. Optional argument: if not provided, the statistics of all queues for a given interface are returned. - `qid`: the TX queue ID for which we want to get the statistics. Optional argument: if not provided, the statistics of all queues for a given interface are returned.
The response given by this method is a JSON-formatted dump as such: The response given by this method is a JSON-formatted dump as such:
``` ```
root@iopsys:~# ubus call qos queue_stats '{"ifname":"eth1","qid":1}' root@iopsys:~# ubus call qos queue_stats '{"ifname":"eth1","qid":1}'
{ {
"queues": [ "queues": [
...@@ -861,4 +860,4 @@ root@iopsys:~# ...@@ -861,4 +860,4 @@ root@iopsys:~#
] ]
} }
``` ```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment