Last, the first official use of the tool, the qdisc monitoring, note that no tc modification is necessary to use the spy qdisc as follows: (the spy qdisc module must be inserted):
CLASS="class add dev $DEV parent"
QDISC="qdisc add dev $DEV parent"
FILTER="filter add dev $DEV parent 1:0 protocol all u32 match u32"
tc qdisc delete root dev $DEV 1>/dev/null 2>&1
tc qdisc add dev $DEV root handle 1: hfsc
tc $CLASS 1: classid 1:1 hfsc ls rate $max_rate ul rate $max_rate
tc $CLASS 1:1 classid 1:10 hfsc ls rate $shared_rate ul rate $max_rate
tc $CLASS 1:1 classid 1:20 hfsc ls rate $shared_rate ul rate $max_rate
tc $CLASS 1:10 classid 1:11 hfsc sc umax $umax_11 dmax $dmax_11 rate $rate_11 ul rate $max_rate
tc $CLASS 1:10 classid 1:12 hfsc sc umax $umax_12 dmax $dmax_12 rate $rate_12 ul rate $max_rate
tc $QDISC 1:11 handle 11: spy
tc $QDISC 11:0 handle 111: bfifo limit $qsize
tc $QDISC 1:12 handle 22: spy
tc $QDISC 22:0 handle 222: bfifo limit $qsize
tc $FILTER 0x00000000 0x00800000 at 0 flowid 1:11
tc $FILTER 0x00800000 0x00800000 at 0 flowid 1:12
The tx is configured to give continuous flow in spy qdisc 11 and bursty in spy qdisc 22.