2dot.jpg

apache2dot

apache2dot.pl parses an apache log file to a format suitable for use with neato or dot, both of which are part of graphviz. This will display links as they are being followed within your web site. Every file is a node, and an arrow is drawn from each referrer within the website to the file someone linked to from it. Darkness of lines is now proportional to how many times the link was used.

Files:

parser apache2dot.pl
generated graphviz input file 2dot.dot
postscript output 2dot.ps (44k)
small jpeg output 2dot.1024.jpg (42k)
large jpeg output 2dot.jpg (178k)

The PostScript file is far supior. I recommend viewing large PostScript files with gv.

PostScript output can be generateded like this:

$ cat /var/log/apache/www.chaosreigns.com-access.log | ./apache2dot.pl > apache.dot
$ neato -Tps apache.dot > apache.ps
$ gv apache.ps

grep can be useful in selecting particular times or sections of your website to graph. The above examples were generated like this:

$ grep 2dot /var/log/apache/www.chaosreigns.com-access.log.0 | grep -v jpg | ./apache2dot.pl > 2dot.dot
$ neato -Tps 2dot.dot > 2dot.ps

PostScript was converted to jpeg using ImageMagick like this:

$ convert 2dot.ps 2dot.jpg
$ convert -geometry 1024x768 2dot.ps 2dot.1024.jpg


Related Programs

LiveWebStats Generate live web statistics from Apache.
cinclude2dot Graph #include relationships within a C source tree.
sig2dot Graph signature relationships in a gpg keyring.
/code/ Code Index / Mailing Lists

If you have suggestions for other data that might be graphed this way, please email me.


Reciprocal Links for this page:
Comment on this page.
Return to Darxus' Home Page
Fri Dec 2 21:50:25 EST 2005