You are not logged in.

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

huvber
Member
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.

#!/bin/bash
rm all.deps
for out in $(pacman -Qqs)
do
	pactree -g $out >> all.deps
done
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.

Offline

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

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,548

Re: Graph visualization of my arch status

You mean like pacgraph?


Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Offline

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

dolik.rce
Member
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:

#!/bin/bash

echo 'digraph G { START [color=red, style=filled]; node [style=filled, color=green]; ' > all.deps
for out in $(pacman -Qqs)
do
        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)

Offline

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

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

Re: Graph visualization of my arch status

Offline

Board footer

Powered by FluxBB