All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Cc: vadim4j@gmail.com, netdev@vger.kernel.org
Subject: Re: [iproute2] tc: Show classes more hierarchically]
Date: Wed, 17 Dec 2014 11:55:35 -0800	[thread overview]
Message-ID: <20141217115535.3f5198d2@urahara> (raw)
In-Reply-To: <54907619.5080508@gmail.com>

On Tue, 16 Dec 2014 16:12:41 -0200
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> wrote:

> On 15-12-2014 20:48, vadim4j@gmail.com wrote:
> > Hi All,
> >
> > I am playing with showing classes in more hierarchically format and I
> > have some code and example of output from my TC looks like:
> >
> > # tc/tc -t class show dev tap0
> >
> >   \---1:2 (htb) prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> >          \---1:40 (htb) prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> >          \---1:50 (htb) prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> >          \---1:60 (htb) prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> >   \---1:1 (htb) prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> >          \---1:10 (htb) prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> >                 \---1:11 (htb) prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> >                        \---1:111 (htb) prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> >          \---1:20 (htb) prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> >          \---1:30 (htb) prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> >
> >
> > which in standart output mode it looks like:
> >
> > # tc/tc class show dev tap0
> >
> > class htb 1:11 parent 1:10 rate 3Mbit ceil 6Mbit burst 15Kb cburst 1599b
> > class htb 1:111 parent 1:11 prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> > class htb 1:10 parent 1:1 rate 5Mbit ceil 5Mbit burst 15Kb cburst 1600b
> > class htb 1:1 root rate 6Mbit ceil 6Mbit burst 15Kb cburst 1599b
> > class htb 1:20 parent 1:1 leaf 20: prio 0 rate 3Mbit ceil 6Mbit burst 15Kb cburst 1599b
> > class htb 1:2 root rate 6Mbit ceil 6Mbit burst 15Kb cburst 1599b
> > class htb 1:30 parent 1:1 leaf 30: prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> > class htb 1:40 parent 1:2 leaf 40: prio 0 rate 5Mbit ceil 5Mbit burst 15Kb cburst 1600b
> > class htb 1:50 parent 1:2 leaf 50: prio 0 rate 3Mbit ceil 6Mbit burst 15Kb cburst 1599b
> > class htb 1:60 parent 1:2 leaf 60: prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> >
> > So I'd like to ask if it might be useful for the TC users (may be
> > better format ?) to have this ?
> 
> Good idea! It already looks good, but what about:
> 
>    |-- 1:2 (htb) prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
>    |      |-- 1:40 (htb) prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
>    |      |-- 1:50 (htb) prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
>    |      '-- 1:60 (htb) prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
>    |-- 1:1 (htb) prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
>    ...
> 
> just another idea..
> 
> Thanks.
>    Marcelo

There are several places that also print tree format, hopefully there would
be reusable code (lspci, tree, ps).

  reply	other threads:[~2014-12-17 19:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15 22:48 [iproute2] tc: Show classes more hierarchically] vadim4j
2014-12-16 13:49 ` Eric Dumazet
2014-12-16 18:12 ` Marcelo Ricardo Leitner
2014-12-17 19:55   ` Stephen Hemminger [this message]
2014-12-17 23:56     ` Vadim Kochan
2014-12-18  1:56       ` Marcelo Ricardo Leitner
2014-12-18  3:12         ` Vadim Kochan
2014-12-18 12:26           ` Marcelo Ricardo Leitner
2014-12-18 12:23             ` Vadim Kochan
2014-12-18 12:46               ` Marcelo Ricardo Leitner
2014-12-18 13:16                 ` Vadim Kochan
2014-12-18 13:47                   ` Daniel Borkmann
2014-12-18 13:46                     ` Vadim Kochan
2014-12-18 13:58                       ` Thomas Graf
2014-12-24 13:59                         ` Vadim Kochan
2014-12-24 15:07                           ` Jamal Hadi Salim

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=20141217115535.3f5198d2@urahara \
    --to=stephen@networkplumber.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vadim4j@gmail.com \
    /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.