You are not logged in.

#1 2013-04-23 12:08:21

Registered: 2011-04-12
Posts: 42

Graph visualization of my arch status

I aim to create a diagram that represent the status of my arch linux. In particular i want to make a graph that have all the packages that i decide to install linked to the dependencies. I tried to use a combination of pactree and dot but without any result. i will post the little script i made so if anyone have some advice.

rm all.deps
for out in $(pacman -Qqs)
	pactree -g $out >> all.deps
dot -Tsvg all.deps > alldeps.svg

the main problem is that inside the file there are distinct graph one per each package. I want to make one entire graph with the dependencies occurs only one and have many links.
I try to find on internet if someone did something like this but i didn't have any luck.


#2 2013-04-23 12:53:13

Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 7,912

Re: Graph visualization of my arch status

You mean like pacgraph?

Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: nVidia GeForce GTX 970 // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.


#3 2013-04-23 18:24:53

From: Czech republic
Registered: 2011-05-04
Posts: 43

Re: Graph visualization of my arch status

Pacgraph is certainly an option, but not everyone likes its output...

If you want to use pactree & dot, it is of course possible, you need just few tweaks to your script:


echo 'digraph G { START [color=red, style=filled]; node [style=filled, color=green]; ' > all.deps
for out in $(pacman -Qqs)
        pactree -g $out
done | sed '/digraph G/d;/^node /d;/^}$/d;' | sort -u >> all.deps
echo '}' >> all.deps

time dot -Tsvg all.deps > alldeps.svg

That will join all the subgraphs into one and remove duplicate dependencies. Note that the final image, is quite incomprehensible, as there is way too many packages wink You might want to play with the settings a bit...

Last edited by dolik.rce (2013-04-23 18:26:42)


#4 2013-04-23 21:45:47

Registered: 2009-08-28
Posts: 3,058

Re: Graph visualization of my arch status


Board footer

Powered by FluxBB