Skip to contentSkip to conversation

statistics and calc bandwidth traffic using tc -s qdisc

LARTC Christian Benvenuti 1 participant 1 message May 20, 2007

lore
Share & tools
lore
#0 lore raw
Quoted 8 lines
Quoted 8 lines

Hello,

Is there someone here who knows what does it means?

The Sent part.

[root at fw ~]# tc -s qdisc show |grep -A 2 "qdisc sfq 140: dev eth0" qdisc sfq 140: dev eth0 parent 1:140 limit 128p quantum 1514b perturb

10sec

Quoted 5 lines
Quoted 5 lines

Sent 3155024 bytes 23249 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 0b 0p requeues 0

[root at fw ~]# tc -s qdisc show |grep -A 2 "qdisc sfq 140: dev eth1" qdisc sfq 140: dev eth1 parent 1:140 limit 128p quantum 1514b perturb

10sec

Quoted 10 lines
Quoted 10 lines

Sent 41141183 bytes 32560 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 0b 0p requeues 0

I also would like to know if there is a way to calc the bandwidth
traffic (in kbit for example) of this customer using this
informations.

Thank you for any help in advance.

Quoted 7 lines
Quoted 1 line

Pablo Fernandes

Hi,

the "Sent" parameter shows you the amount of data that fall into this qdisc. You can obtain the instant bandwith usage that falls into this qdisc parsing the "rate" parameter. In your example the rate is 0bit,

that

Quoted 2 lines

means 0 bits per second bandwith usage.
I must admit that the output from tc -s is a big pain !!

Hi Pablo, Eric,

the rate parameter is (usually) not initialized unless you ask for it
explicitly.

HTB by default measures the rate of its classes (not the qdisc), but the other qdisc do not.
If you want to measure the rates (of a non-HTB class), you need to use the "estimator" option.
You also need to make sure your kernel is compiled with support for it:

	Networking
	+-> Networking options
	    +-> QoS and/or fair queueing
	        +-> Rate estimator

The "Rate estimator" option is selected by default, for example, if you enable the "Actions" option (that is in the same menu).

Here is an example of configuration of a SFQ qdisc with an estimator attached:

tc qdisc add dev eth1 root estimator 1sec 8sec sfq perturb 10

                           ^^^^^^^^^^^^^^^^^^^

The above example (1sec 8sec) says this:
read the counters every "1 second" and give me the EWMA average rate over an interval of "8 seconds".

Here is an example of output:

qdisc sfq 8001: limit 128p quantum 1514b flows 128/1024 perturb 10sec
Sent 24010 bytes 245 pkt (dropped 0, overlimits 0 requeues 0) rate 7520bit 10pps backlog 0b 0p requeues 0 ^^^^^^^^^^^^^^^^^^

"rate" is the bit/s rate and "pps" is the pkt/s rate.

Regards
/Christian
[http://benve.info]

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc