From 1c79b8f93c0373be9ef9fbf1cc0f116466784c9f Mon Sep 17 00:00:00 2001 From: Sukru Senli <sukru.senli@iopsys.eu> Date: Sun, 11 Apr 2021 13:30:48 +0200 Subject: [PATCH] update README --- README.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 6ac35a2..6904d54 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:~# ] } - ``` +``` -- GitLab