Florian Philipp <li...@binarywings.net> [11-09-28 04:05]:
> Am 27.09.2011 20:24, schrieb meino.cra...@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 via email to