From: Jarek Poplawski <jarkao2@gmail.com>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org,
David Miller <davem@davemloft.net>,
Patrick McHardy <kaber@trash.net>
Subject: Re: [NET] Add proc file to display the state of all qdiscs.
Date: Wed, 2 Sep 2009 23:27:08 +0200 [thread overview]
Message-ID: <20090902212708.GC3018@ami.dom.local> (raw)
In-Reply-To: <alpine.DEB.1.10.0909011943430.12066@V090114053VZO-1>
Christoph Lameter wrote, On 09/02/2009 01:52 AM:
> [NET] Add proc file to display the state of all qdiscs
>
> TC is a complicated tool and it currently does not allow the display of all
> qdisc states. It does not support multiple tx queues and also not
> localhost, nor does it display the current operating state of the queues.
>
> This functionality could be added to tc / netlink but the tool is already
> complex to handle. The simple proc file here allows easy scanning by
> scripts and other tools. However, tc still needs to be updated to allow
> the modifications of multiqueue TX settings. tc's main focus is the
> configuration of qdiscs. The qdisc_stats file just shows the current
> state.
>
> This patch adds
>
> /proc/net/qdisc_stats
>
> which displays the current state of all qdiscs on the system.
>
> F.e.
>
> $ cat /proc/net/qdisc_stats
> Queue Device State Bytes Packets Qlen Blog Drops Requeue Overlimit
> TX0/root lo - 0 0 0 0 0 0 0
> RX/root lo - 0 0 0 0 0 0 0
> TX0/root eth0 - 5518 60 0 0 0 0 0
> TX1/root eth0 - 2549 37 0 0 0 0 0
> TX2/root eth0 - 63625 272 0 0 0 0 0
> TX3/root eth0 - 1580 21 0 0 0 0 0
> TX4/root eth0 R 88979440 260183 0 3532 43176 2111 0
> TX5/root eth0 - 4698 56 0 0 0 0 0
> TX6/root eth0 - 3598883129 10523140 0 0 0 0 0
> TX7/root eth0 - 1750 21 0 0 0 0 0
>
>
> Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
>
> ---
> net/sched/sch_api.c | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 130 insertions(+)
>
> Index: linux-2.6/net/sched/sch_api.c
> ===================================================================
> --- linux-2.6.orig/net/sched/sch_api.c 2009-09-01 12:27:24.000000000 -0500
> +++ linux-2.6/net/sched/sch_api.c 2009-09-01 14:39:27.000000000 -0500
...
> +static void qdisc_seq_out(struct seq_file *seq, struct net_device *dev)
> +{
> + struct netdev_queue *dev_queue;
> + int i;
> +
> + for (i = 0; i < dev->real_num_tx_queues; i++) {
> + char buffer[10];
> +
> + dev_queue = netdev_get_tx_queue(dev, i);
> + sprintf(buffer, "TX%d", i);
> + dump_qdisc_root(seq, dev, dev_queue->qdisc_sleeping, buffer);
> + }
...
Btw, Patrick's comments reminded me this is probably not what you want
in case of non-default qdiscs: the root qdisc like prio will be
repeated for each tx queue with the same stats. I guess you need to do
here an additional query e.g. by comparing dev_queue->qdisc_sleeping
with that of i = 0.
Jarek P.
next prev parent reply other threads:[~2009-09-02 21:27 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-01 23:52 [NET] Add proc file to display the state of all qdiscs Christoph Lameter
2009-09-02 8:14 ` Jarek Poplawski
2009-09-02 8:28 ` Eric Dumazet
2009-09-02 8:30 ` David Miller
2009-09-02 12:30 ` [PATCH net-next-2.6] tc: report informations for multiqueue devices Eric Dumazet
2009-09-02 12:48 ` Eric Dumazet
2009-09-02 16:23 ` Stephen Hemminger
2009-09-02 16:30 ` Patrick McHardy
2009-09-02 16:50 ` Eric Dumazet
2009-09-02 17:17 ` [PATCH net-next-2.6] vlan: multiqueue vlan devices Eric Dumazet
2009-09-02 17:49 ` Patrick McHardy
2009-09-02 18:37 ` Brian Haley
2009-09-02 18:55 ` Eric Dumazet
2009-09-02 19:01 ` Stephen Hemminger
2009-09-02 19:12 ` Eric Dumazet
2009-09-03 1:04 ` David Miller
2009-09-03 1:05 ` Eric Dumazet
2009-09-03 9:17 ` Eric Dumazet
2009-09-03 9:20 ` David Miller
2009-09-02 17:31 ` [PATCH net-next-2.6] tc: report informations for multiqueue devices Eric Dumazet
2009-09-02 17:50 ` Patrick McHardy
2009-09-02 13:18 ` Patrick McHardy
2009-09-02 13:49 ` Eric Dumazet
2009-09-02 14:07 ` Patrick McHardy
2009-09-02 22:17 ` Jarek Poplawski
2009-09-02 9:18 ` [NET] Add proc file to display the state of all qdiscs Jarek Poplawski
2009-09-02 9:33 ` Jarek Poplawski
2009-09-02 9:37 ` Jarek Poplawski
2009-09-02 12:44 ` Patrick McHardy
2009-09-02 18:13 ` Christoph Lameter
2009-09-03 14:19 ` Jesper Dangaard Brouer
2009-09-03 14:29 ` Patrick McHardy
2009-09-03 14:43 ` Eric Dumazet
2009-09-03 17:30 ` Jesper Dangaard Brouer
2009-09-03 17:56 ` Patrick McHardy
2009-09-03 23:31 ` David Miller
2009-09-04 1:36 ` Patrick McHardy
2009-09-04 1:43 ` Patrick McHardy
2009-09-03 23:28 ` David Miller
2009-09-03 23:22 ` David Miller
2009-09-02 18:12 ` Christoph Lameter
2009-09-02 19:49 ` Jarek Poplawski
2009-09-02 21:27 ` Jarek Poplawski [this message]
2009-09-03 18:03 ` Christoph Lameter
2009-09-03 19:35 ` Jarek Poplawski
2009-09-03 19:38 ` Eric Dumazet
2009-09-03 19:54 ` Jarek Poplawski
[not found] <20090902080921.GA4878@ff.dom.local>
2009-09-02 18:11 ` Christoph Lameter
2009-09-02 19:33 ` Jarek Poplawski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090902212708.GC3018@ami.dom.local \
--to=jarkao2@gmail.com \
--cc=cl@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.