diff --git a/README.md b/README.md index 6ac35a2b59f678a5a5ba7a74e4cd468e4dac93c4..6904d544ccf257d3a41190401a059d26bc735181 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -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`. @@ -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. -````bash +``` config queue 'q_0_eth1' option enable '1' option ifname 'eth1' @@ -413,27 +412,27 @@ config policer option meter_type '0' 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. -````bash +``` root@iopsys:~# ubus -v list | grep qos 'qos' @e1f3b458 root@iopsys:~# -```` +``` -````bash +``` root@iopsys:~# ubus -v list qos 'qos' @e1f3b458 "queue_stats":{"ifname":"String","qid":"String"} "reload":{"section":"String"} root@iopsys:~# -```` +``` -````bash +``` root@iopsys:~# root@iopsys:~# ubus -S call qos reload root@iopsys:~# @@ -445,14 +444,14 @@ root@iopsys:~# ubus -S call qos reload '{"section":"policer"}' root@iopsys:~# root@iopsys:~# ubus -S call qos reload '{"section":"shaper"}' root@iopsys:~# -```` +``` - `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. - `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: - ``` +``` root@iopsys:~# ubus call qos queue_stats '{"ifname":"eth1","qid":1}' { "queues": [ @@ -861,4 +860,4 @@ root@iopsys:~# ] } - ``` +```