Hello, Does there exist any tool that can report the current bandwidth information that is managed by tc(traffic control) tool. I can use the tool to get the current(or accumulated) bandwidth used by each tc queue. Currently I can only use the following commands to get the configurations of tc. tc qdisc show tc class show dev eth0 tc class show dev eth1 tc filter show dev eth0 tc filter show dev eth1 But if I want to know what is the value of throughput on eth0/eth1 currently. And the value of throughput will be refreshed every period of time. How can I do?? Thanks for your assist Vincent
Jason Boxman
2005-Feb-15 01:37 UTC
Re: Tools to get current bandwidth of queue or speed rate?
On Monday 14 February 2005 19:50, Vincent wrote:> Hello, > > Does there exist any tool that can report the current bandwidth > information that is managed by tc(traffic control) tool. > I can use the tool to get the current(or accumulated) bandwidth used by > each tc queue. ><snip>> But if I want to know what is the value of throughput on eth0/eth1 > currently. > And the value of throughput will be refreshed every period of time. How > can I do??You can always run `ifconfig eth0` and look at the TX line, then do that again in 10 seconds and calculate and graph the difference. That''s your TX rate. You can do the same thing for your qdiscs, too. -- Jason Boxman Perl Programmer / *NIX Systems Administrator Shimberg Center for Affordable Housing | University of Florida http://edseek.com/ - Linux and FOSS stuff _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> On Monday 14 February 2005 19:50, Vincent wrote: > > Hello, > > > > Does there exist any tool that can report the current bandwidth > > information that is managed by tc(traffic control) tool. I can usethe> > tool to get the current(or accumulated) bandwidth used by each tc > > queue. > > >> tc qdisc show >> tc class show dev eth0 >> tc class show dev eth1 >> tc filter show dev eth0 >> tc filter show dev eth1 >> > > But if I want to know what is the value of throughput on eth0/eth1 > > currently. And the value of throughput will be refreshed > every period > > of time. How can I do?? > > You can always run `ifconfig eth0` and look at the TX line, > then do that again > in 10 seconds and calculate and graph the difference. That''s > your TX rate. > You can do the same thing for your qdiscs, too.How to do the same thing for the qdisc (ifconfig eth0?) ?? Besides, the script of tc I am using is something like the following: tc qdisc add dev eth0 root handle 1: htb default 10 r2q 100 tc class add dev eth0 parent 1: classid 1:1 htb rate 1mbps burst 2048k tc qdisc add dev eth0 parent 1:1 handle 3: sfq perturb 100 tc filter add dev eth0 protocol ip parent 1:0 prio 1 handle 3 fw flowid 1:1 Here I want to get the information is the current throughput of tc class in each nic. It''s a little like the following commands. But not the configuration of bandwith on each class. # tc class show dev eth0 I wan to know the throughput of run time on each class. Thanks for your response Vincent _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Jason Boxman
2005-Feb-15 05:04 UTC
Re: Tools to get current bandwidth of queue or speed rate?
On Tuesday 15 February 2005 00:01, Vincent wrote:> > How to do the same thing for the qdisc (ifconfig eth0?) ??You could try `tc -s qdisc show dev eth0` for statistics. -- Jason Boxman Perl Programmer / *NIX Systems Administrator Shimberg Center for Affordable Housing | University of Florida http://edseek.com/ - Linux and FOSS stuff _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> > On Tuesday 15 February 2005 00:01, Vincent wrote: > > > > How to do the same thing for the qdisc (ifconfig eth0?) ?? > > You could try `tc -s qdisc show dev eth0` for statistics. >Thank you for your kindly response Another question. How can I flush the value of throughput reported by "tc -s qdisc show dev eth0" command. My meaning is how to make the value of throughput restored to the zero(0). # tc -s qdisc show dev eth0 qdisc htb 1: r2q 100 default 10 direct_packets_stat 12450584 Sent 1804550758 bytes 12847505 pkts (dropped 0, overlimits 389553) qdisc sfq 3: parent 1:1 limit 128p quantum 1514b perturb 100sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 6: parent 1:2 limit 128p quantum 1514b perturb 100sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 9: parent 1:3 limit 128p quantum 1514b perturb 100sec Sent 426161959 bytes 396921 pkts (dropped 0, overlimits 0) Vincent _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Jason Boxman
2005-Feb-15 05:29 UTC
Re: Tools to get current bandwidth of queue or speed rate?
On Tuesday 15 February 2005 00:24, Vincent wrote: <snip>> Thank you for your kindly response > Another question. > How can I flush the value of throughput reported by "tc -s qdisc show > dev eth0" command. > My meaning is how to make the value of throughput restored to the > zero(0).The only way I know to do that is to delete the whole structure with `tc qdisc del ...` and then recreate it. If anyone else has a better way to zero out qdisc statistics I''d be curious to know. -- Jason Boxman Perl Programmer / *NIX Systems Administrator Shimberg Center for Affordable Housing | University of Florida http://edseek.com/ - Linux and FOSS stuff _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
rsenykoff@harrislogic.com
2005-Feb-15 18:42 UTC
Re: Tools to get current bandwidth of queue or speed rate?
> <snip> > > Thank you for your kindly response > > Another question. > > How can I flush the value of throughput reported by "tc -s qdisc show > > dev eth0" command. > > My meaning is how to make the value of throughput restored to the > > zero(0). > > The only way I know to do that is to delete the whole structure with`tcqdisc> del ...` and then recreate it. If anyone else has a better way to zeroout> qdisc statistics I''d be curious to know.I just reapply my script that sets up the queues. The first line in my scripts is tc qdisc del root dev $e I have a service ''bridge'' that configures the bridge, then it calls shape.eth0.sh and shape.eth1.sh. This way I can tweak the shaping and run the scripts without restarting the bridge. I havn''t noticed any impact of doing this, so I guess that any packets in queues when the queues are deleted just get sent (I''ve run the scripts during video conferences with no noticeable impact). -Ron
> <snip> > > Thank you for your kindly response > > Another question. > > How can I flush the value of throughput reported by "tc -s qdiscshow> > dev eth0" command. > > My meaning is how to make the value of throughput restored to the > > zero(0). > > The only way I know to do that is to delete the whole structurewith`tc qdisc> del ...` and then recreate it. If anyone else has a better way tozero out> qdisc statistics I''d be curious to know.> I just reapply my script that sets up the queues. The first line in myscripts is tc qdisc del root dev $e I have a service ''bridge'' that configures the bridge, then it calls shape.eth0.sh and shape.eth1.sh. This way I can tweak the shaping and run the scripts without restarting the bridge. I havn''t noticed any impact of doing this, so I guess that any packets in queues when the queues are deleted just get sent (I''ve run the scripts during video conferences with no noticeable impact). You mean you have applied your script. But I don''t see the "script". Another question is we are trying to zero out qdisc statistic (make the value of throughput restored to the zero). And your reply seems not related to the topic :) Vincent _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/