You are not logged in.

#1 2009-04-29 18:35:58

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

pacgraph: Visualize your system

It draws a pretty picture of your installed packages.  Some examples:

a lightweight server
my primary computer
my old desktop

To try it yourself, get it from the AUR or get the code and run pacgraph.  It will generate an SVG.  If Inkscape or imagemagick is installed it will also render a PNG.  It might seem a little slow, but it's many times faster than Graphviz.

Stuff supported from the command line:

Want to make only an SVG, no PNG?
  -s --svg
Don't even want to render and SVG?
  -c --console

Custom colors?  Each of these takes one color, such as
 
  pacgraph -b "#808080" -l "#ffffff"

  -b --background           
  -l --link     
  -t --top         
  -d --dep           

Font size can be set with
 
  pacgraph -p 10 100

where the first number is the smallest point size, and the second is the largest.

By default optional dependencies are not counted towards a package.  You can enable this with
  -o --opt-deps

Last edited by keenerd (2009-05-24 21:51:19)

Offline

#2 2009-04-29 18:48:23

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: pacgraph: Visualize your system

I think that may be the neatest thing to happen to Arch since Xyne

Offline

#3 2009-04-29 19:01:31

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: pacgraph: Visualize your system

Dusty wrote:

I think that may be the neatest thing to happen to Arch since Xyne

well put and i agree completely; Xyne should recode that to graphically show his interrelated arch contributions; should take him, what, like 7 minutes?

Offline

#4 2009-04-29 19:12:44

qubodup
Member
Registered: 2008-01-19
Posts: 66

Re: pacgraph: Visualize your system

Interesting.

3486134021_d3efcc6e30.jpg

Is there a tool to permanently record application usage? Would be interesting a graph of apps used over a few months.

Offline

#5 2009-04-29 19:24:59

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: pacgraph: Visualize your system

@keenard
That's a very nice app. I had to modify the strip_info function at line 53 in pac_parse.py to handle metapackages without files in them (which lack %SIZE%). Here's the modified function:

def strip_info(info):
    keep = ['DEPENDS', 'OPTDEPENDS', 'PROVIDES', 'SIZE']
    info = dict((k.strip('%'),v) for k,v in info.iteritems())
    name = info['NAME'][0]
    info = dict((k,v) for k,v in info.iteritems() if k in keep)
    if not info.has_key('SIZE'):
      info['SIZE'] = 0
    else:
      info['SIZE'] = int(info['SIZE'][0], 10)
    return name, info

I'm not sure if that's the best way to do it (maybe 1 instead of 0, didn't check the output for the metapackages [edit]nvm, the metapackages are displayed[/edit]), but it got me past the error.

Also, could you please place both files in a dir named pacgraph inside the tarball? I really don't like it when an archive extracts multiple files to my cwd.

@Dusty & brisbin33
lol smile

Last edited by Xyne (2009-04-29 19:28:17)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#6 2009-04-29 19:29:00

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: pacgraph: Visualize your system

brisbin33 wrote:
Dusty wrote:

I think that may be the neatest thing to happen to Arch since Xyne

well put and i agree completely; Xyne should recode that to graphically show his interrelated arch contributions; should take him, what, like 7 minutes?

Isn't Xyne the coolest guy on the internet?


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#7 2009-04-29 19:42:05

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: pacgraph: Visualize your system

haxit wrote:
brisbin33 wrote:
Dusty wrote:

I think that may be the neatest thing to happen to Arch since Xyne

well put and i agree completely; Xyne should recode that to graphically show his interrelated arch contributions; should take him, what, like 7 minutes?

Isn't Xyne the coolest guy on the internet?

No that's Mr. Green.

Dusty

Offline

#8 2009-04-29 19:47:17

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: pacgraph: Visualize your system

@qubodup:
Cool, thanks!  Though it looks like you got a bad roll of the RNG, usually it is more centered around the origin (almost always glibc).

Actually, fixed that.  Tarball is updated.  Should be more symmetrical now.

@Xyne
Patched the code (thanks) and corrected the tarball.

Last edited by keenerd (2009-04-29 19:58:33)

Offline

#9 2009-04-29 19:57:05

dodobas
Member
From: Croatia
Registered: 2009-04-21
Posts: 12

Re: pacgraph: Visualize your system

very nice, keenerd, can you explain how do you calculate weight of node in a graph?


It would also be great to have my computer built into my skull. That way I could surf the Net during useless periods of life, such as when people talk to me.

Offline

#10 2009-04-29 21:01:17

Yannick_LM
Member
Registered: 2008-12-22
Posts: 142

Re: pacgraph: Visualize your system

Here's mine:

tMWxtNA

(Realizing I just got too much useless things here)
I'm actually not using gnome or kde anymore ...

Nice app, by the way. I tried to a bit of the same thing with dot, but results were quite ugly.

Offline

#11 2009-04-29 21:07:53

fijam
Member
Registered: 2009-02-03
Posts: 244
Website

Re: pacgraph: Visualize your system

I have been thinking about such a tool for a week but lacked skill to write it! Thanks a bunch!

Offline

#12 2009-04-29 21:09:57

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: pacgraph: Visualize your system

@dodobas
The font weight is proportionate to the total size of a package.  If a package has any unique dependencies, their sizes are absorbed into the parent.  Basically, the size is the space freed by a "pacman -Rc". 

Every now and then this dependency compression does weird stuff.  In my desktop pacgraph, the OO spellcheck library is huge, because it depends on OO.  Nothing else depends on OO, so OO's massive size is added to the small dictionary.

@Yannick_LM
Nice graph, the RNG gods must favor you :-)
It looks like Gnome and KDE clustered well, but your Python stuff is all over the map.

Realizing I just got too much useless things here

Originally this found packages not worth their diskspace.

I feel you pain with dot.  I wasted a week before learning that dot is basically worthless when you have +100 nodes.

@fijam
You are welcome.

Last edited by keenerd (2009-04-29 21:33:52)

Offline

#13 2009-04-29 22:04:51

jwcxz
Member
Registered: 2008-09-23
Posts: 239
Website

Re: pacgraph: Visualize your system

pacgraph_t.png

Gosh, my system is far messier than I realized it was...  Time to go clean some unused packages out.  Definitely not nexuiz, though.  big_smile

Thanks for this awesome tool!

Last edited by jwcxz (2009-04-29 22:05:04)


-- jwc
http://jwcxz.com/ | blog
dotman - manage your dotfiles across multiple environments
icsy - an alarm for powernappers

Offline

#14 2009-04-29 22:05:16

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: pacgraph: Visualize your system

wow! that helped me to get rid of over 500mb in packages...
and what a brick that openoffice is!

Offline

#15 2009-04-29 22:53:07

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: pacgraph: Visualize your system

Should I uninstall some of the packages on my laptop? tongue

pac3.th.png

Offline

#16 2009-04-29 23:42:16

qubodup
Member
Registered: 2008-01-19
Posts: 66

Re: pacgraph: Visualize your system

I tried the new 'version' -- with color changes.

3487510826_e4014a079d_m.jpg

Offline

#17 2009-04-29 23:43:32

evr
Arch Linux f@h Team Member
Registered: 2009-01-23
Posts: 554

Re: pacgraph: Visualize your system

qubodup wrote:

I tried the new 'version' -- with color changes.

http://farm4.static.flickr.com/3332/348 … 079d_m.jpg

nice, i like the dark look alot better

Offline

#18 2009-04-29 23:54:50

jordz
Member
Registered: 2006-02-01
Posts: 248

Re: pacgraph: Visualize your system

Tried it on my laptop, it just got a fresh install + gnome

pacgraph-thumb.png

Last edited by jordz (2009-04-29 23:55:06)

Offline

#19 2009-04-30 00:04:47

utore
Member
From: USA
Registered: 2008-01-27
Posts: 67
Website

Re: pacgraph: Visualize your system

pacgraph_output_small.png


Something witty.

Offline

#20 2009-04-30 00:55:24

Lexion
Member
Registered: 2008-03-23
Posts: 510

Re: pacgraph: Visualize your system

Mine: http://fc03.deviantart.com/fs44/f/2009/ … ion314.png

I didn't know xmonad-contrib was so big.

This is an neat little gadget.  I don't know of any better complement.

Last edited by Lexion (2009-04-30 00:55:44)


urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand

Offline

#21 2009-04-30 00:57:32

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: pacgraph: Visualize your system

Lexion wrote:

Mine: http://fc03.deviantart.com/fs44/f/2009/ … ion314.png

I didn't know xmonad-contrib was so big.

This is an neat little gadget.  I don't know of any better complement.

Holy —!

That is one big package you got there. wink

Offline

#22 2009-04-30 01:06:47

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: pacgraph: Visualize your system

Minor update, it now identifies the top level packages.  Demo screenshots have been updated too.

Thanks all who are giving this a whirl.  It appears that XFCE clumps up nicely, while Gnome grows outward very quickly.  No idea why.

@qubodup
Some of the lines disappeared in your recoloring.  I presume you used Gimp/select-by-color?  Another option is to edit the svg file in a text editor.  There are just four lines to set all the colors.  Then you can re-render it with

inkscape -D -b "#ffffff" -e pac3.png pac3.svg

where "#ffffff" is the background color.

@Lexion
It isn't.  But xmonad-contrib depends on xmonad depends on haskell.  Chances are xmonad is the only haskell app you've got.  Unshared dependencies are absorbed by their parent, so it's got the full weight of haskell counting against it.  (That behavior could be changed, but it removes around 25% of the packages, making things that much easier to read.)

Next up, decent command line opts and throw it on the AUR.

Offline

#23 2009-04-30 02:05:54

koch
Member
From: Germany
Registered: 2008-01-26
Posts: 369

Re: pacgraph: Visualize your system

pac3corx.png

time to clean up smile

Offline

#24 2009-04-30 02:36:28

flowheat
Member
From: Pittsburgh, PA
Registered: 2008-09-23
Posts: 94

Re: pacgraph: Visualize your system

Amusingly enough installing inkscape so i could produce the .png was the biggest package on my system

tMWxucA

Offline

#25 2009-04-30 02:53:09

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: pacgraph: Visualize your system

flowheat, that is a tight installation you've got.  I am impressed.

Might I recommend a two step process?  Run pacgraph without inkscape.  It will still make the SVG.  Then install inkscape and punch in the render command.

Offline

Board footer

Powered by FluxBB