Re: statistics and calc bandwidth traffic using tc -s qdisc show

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> 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
>>  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
>>  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.
>> 
>> 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 
>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
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux