2016-04-15 11:14:48 +02:00
|
|
|
|
|
|
|
Plugin: tcqos
|
|
|
|
Description::
|
|
|
|
Plugin which will look and discover linux qos using tc command
|
|
|
|
::
|
|
|
|
|
|
|
|
Version: 0.1
|
|
|
|
Url: https://raw.githubusercontent.com/limosek/zaf-plugins/master/tcqos
|
|
|
|
Web: https://github.com/limosek/zaf-plugins/
|
|
|
|
Maintainer: Lukas Macura <lukas@macura.cz>
|
|
|
|
|
|
|
|
# Dependencies
|
2016-12-05 12:22:44 +01:00
|
|
|
Depends-dpkg: dash iproute
|
|
|
|
Depends-opkg: busybox ip
|
|
|
|
Depends-bin: ip
|
2016-04-15 11:14:48 +02:00
|
|
|
|
|
|
|
Item discovery_interfaces:
|
|
|
|
Description::
|
|
|
|
Discovery of tc enabled interfaces
|
|
|
|
::
|
2016-04-21 15:29:20 +02:00
|
|
|
Script: tc qdisc show | sed 's/.*dev \([\_a-z0-9\-]*\).*/\1/' | sort | uniq | zaf_discovery '{#IFACE}'
|
2016-04-15 11:14:48 +02:00
|
|
|
/Item
|
|
|
|
|
|
|
|
Item discovery_classes:
|
|
|
|
Description::
|
|
|
|
Discovery of tc classes
|
|
|
|
::
|
|
|
|
Script::
|
|
|
|
ifs=$(tc qdisc show | sed 's/.*dev \([\_a-z0-9\-]*\).*/\1/' | sort | uniq)
|
|
|
|
for i in $ifs; do
|
|
|
|
tc class ls dev $i |cut -d ' ' -f 2,3,5 | while read type id parent; do
|
|
|
|
echo $i $type $id $parent
|
|
|
|
done | zaf_discovery '{#IFACE}' '{#TYPE}' '{#ID}' '{#PARENT}'
|
|
|
|
done
|
|
|
|
::
|
|
|
|
/Item
|
|
|
|
|
|
|
|
Item discovery_qdiscs:
|
2016-04-21 15:29:20 +02:00
|
|
|
Parameters::
|
|
|
|
interface '' ''
|
|
|
|
::
|
2016-04-15 11:14:48 +02:00
|
|
|
Description::
|
|
|
|
Discovery of tc qdiscs
|
|
|
|
::
|
2016-04-21 15:29:20 +02:00
|
|
|
Cmd: tc qdisc show |cut -d ' ' -f 2,3,5,7 | zaf_discovery '{#TYPE}' '{#ID}' '{#IFACE}' '{#PARENT}'
|
2016-04-15 11:14:48 +02:00
|
|
|
/Item
|
|
|
|
|
|
|
|
Item qdisc_limit:
|
2016-04-21 15:29:20 +02:00
|
|
|
Parameters:
|
|
|
|
interface '' '' # Interface
|
|
|
|
id '' '' # Id
|
|
|
|
::
|
2016-04-15 11:14:48 +02:00
|
|
|
Description::
|
|
|
|
Show limit of given qdisc handle
|
|
|
|
::
|
2016-04-21 15:29:20 +02:00
|
|
|
Cmd: tc -s qdisc show dev $1 | awk '/qdisc(.*)'$1':/ { print $7 }' | tr -d 'p'
|
2016-04-15 11:14:48 +02:00
|
|
|
/Item
|
|
|
|
|
|
|
|
Item qdisc_flows:
|
2016-04-21 15:29:20 +02:00
|
|
|
Parameters:
|
|
|
|
interface '' '' # Interface
|
|
|
|
id '' '' # Id
|
|
|
|
::
|
2016-04-15 11:14:48 +02:00
|
|
|
Description::
|
|
|
|
Show flows of given qdisc handle
|
|
|
|
::
|
2016-04-21 15:29:20 +02:00
|
|
|
Cmd: tc -s qdisc show dev $1 | awk '/qdisc(.*)'$1':/ { print $9 }' | tr -d 'p'
|
2016-04-15 11:14:48 +02:00
|
|
|
/Item
|
|
|
|
|
|
|
|
Item class_sentbytes:
|
2016-04-21 15:29:20 +02:00
|
|
|
Parameters:
|
|
|
|
interface '' '' # Interface
|
|
|
|
id '' '' # Id
|
|
|
|
::
|
2016-04-15 11:14:48 +02:00
|
|
|
Description::
|
|
|
|
Show bytes sent to this class
|
|
|
|
::
|
2016-04-21 15:29:20 +02:00
|
|
|
Cmd: tc -s class show dev $1 | awk '/class(.*)'$2'/ { getline; print $2 }'
|
2016-04-15 11:14:48 +02:00
|
|
|
/Item
|
|
|
|
|
|
|
|
Item class_sentpackets:
|
2016-04-21 15:29:20 +02:00
|
|
|
Parameters:
|
|
|
|
interface '' '' # Interface
|
|
|
|
id '' '' # Id
|
|
|
|
::
|
2016-04-15 11:14:48 +02:00
|
|
|
Description::
|
|
|
|
Show packets sent to this class
|
|
|
|
::
|
2016-04-21 15:29:20 +02:00
|
|
|
Cmd: tc -s class show dev $1 | awk '/class(.*)'$2'/ { getline; print $4 }'
|
2016-04-15 11:14:48 +02:00
|
|
|
/Item
|
|
|
|
|
|
|
|
Item class_dropped:
|
2016-04-21 15:29:20 +02:00
|
|
|
Parameters:
|
|
|
|
interface '' '' # Interface
|
|
|
|
id '' '' # Id
|
|
|
|
::
|
2016-04-15 11:14:48 +02:00
|
|
|
Description::
|
|
|
|
Show dropped packets in this class
|
|
|
|
::
|
2016-04-21 15:29:20 +02:00
|
|
|
Cmd: tc -s class show dev $1 | awk '/class(.*)'$2'/ { getline; print $7 }' | tr -d ','
|
2016-04-15 11:14:48 +02:00
|
|
|
/Item
|
|
|
|
|
|
|
|
Item class_overlimit:
|
2016-04-21 15:29:20 +02:00
|
|
|
Parameters:
|
|
|
|
interface '' '' # Interface
|
|
|
|
id '' '' # Id
|
|
|
|
::
|
2016-04-15 11:14:48 +02:00
|
|
|
Description::
|
|
|
|
Show overlimit packets in this class
|
|
|
|
::
|
2016-04-21 15:29:20 +02:00
|
|
|
Cmd: tc -s class show dev $1 | awk '/class(.*)'$2'/ { getline; print $9 }' | tr -d ','
|
2016-04-15 11:14:48 +02:00
|
|
|
/Item
|
|
|
|
|
|
|
|
|