public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: meino.cramer@gmx.de
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] "pstree" for modules ?
Date: Wed, 28 Sep 2011 05:12:12 +0200	[thread overview]
Message-ID: <20110928031212.GA8168@solfire> (raw)
In-Reply-To: <4E82255F.5030700@binarywings.net>

Florian Philipp <lists@binarywings.net> [11-09-28 04:05]:
> Am 27.09.2011 20:24, schrieb meino.cramer@gmx.de:
> > Hi,
> > 
> > ist there a tool, which displays the dependencies of loaded modules as
> > a tree like pstree does for tasks?
> > 
> > Thank you very much for any help in advance! :)
> > 
> > Best regards
> > mcc
> > 
> > 
> > 
> 
> Well, it's not a tool and it cannot print to terminal but you might want
> to try out the bash skript below. It depends on media-gfx/graphviz to
> create a postscript file visualizing the dependencies. The file will be
> opened by your default postscript viewer (evince, okular, etc.).
> 
> Hope this helps,
> Florian Philipp
> 
> psFile=$(tempfile --suffix=.ps)
> lsmod | tail -n +2 | awk '{print $1,$4}' | tr ' ,' ' ' |
> (
>   echo 'digraph modules { rankdir=LR; '
>     while read line; do
>       dependencies=( $line )
>       dependingOn="${dependencies[0]}"
>       unset dependencies[0]
>       for dependant in "${dependencies[@]}"; do
>         echo "\"$dependant\" -> \"$dependingOn\";"
>       done
>     done
>     echo '}'
> ) | dot -Tps > "$psFile"
> xdg-open "$psFile"
> unlink "$psFile"
> 

Hi Florian,

thank you for your mail and the script.
Unfortunately this is a little of a Lambourghini
solution where a bicycle would completly suffice... ;)

I had searched for a terminal related tool as pstree.

Best regards,
mcc




  reply	other threads:[~2011-09-28  3:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-27 18:24 [gentoo-user] "pstree" for modules ? meino.cramer
2011-09-27 19:34 ` Florian Philipp
2011-09-28  3:12   ` meino.cramer [this message]
2011-09-28  7:42     ` Florian Philipp
2011-09-28 10:41       ` Willie Wong
2011-09-28 14:17         ` Albert W. Hopkins

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=20110928031212.GA8168@solfire \
    --to=meino.cramer@gmx.de \
    --cc=gentoo-user@lists.gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox