From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R8kaK-0004lU-Ge for garchives@archives.gentoo.org; Wed, 28 Sep 2011 03:13:24 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 20BA421C09F; Wed, 28 Sep 2011 03:13:15 +0000 (UTC) Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by pigeon.gentoo.org (Postfix) with SMTP id 0615A21C09F for ; Wed, 28 Sep 2011 03:12:11 +0000 (UTC) Received: (qmail invoked by alias); 28 Sep 2011 03:12:11 -0000 Received: from p54851396.dip0.t-ipconnect.de (EHLO gmx.net) [84.133.19.150] by mail.gmx.net (mp060) with SMTP; 28 Sep 2011 05:12:11 +0200 X-Authenticated: #20088476 X-Provags-ID: V01U2FsdGVkX19ZS0FCJm5ZH4TK5A8SrZeokjNtZa3C9J6wNcSBZt DCIa9mzcT4Uw+R Received: by gmx.net (nbSMTP-1.00) for uid 1001 Meino.Cramer@gmx.de; Wed, 28 Sep 2011 05:12:12 +0200 (CEST) Date: Wed, 28 Sep 2011 05:12:12 +0200 From: meino.cramer@gmx.de To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] "pstree" for modules ? Message-ID: <20110928031212.GA8168@solfire> References: <20110927182445.GA6803@solfire> <4E82255F.5030700@binarywings.net> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E82255F.5030700@binarywings.net> User-Agent: mutt-ng/devel-r804 (Linux) X-Y-GMX-Trusted: 0 X-Archives-Salt: X-Archives-Hash: 24c3f76d11c611d2df0b1a7a790529b8 Florian Philipp [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