Index of /Visitors
Name Last modified Size
Parent Directory -
original.png 2012-12-17 00:46 458K
processed.png 2012-12-17 00:46 343K
processed.dot 2012-12-17 00:46 8.9K
widen-lines.pl.txt 2012-12-16 23:20 6.9K
original.dot 2012-12-17 00:46 3.6K
ReadMe.txt 2012-12-17 00:46 2.2K
The 'visitors' tool, at http://www.hping.org/visitors/ can be used
to process web logs and provide a great analysis of the paths that
are commonly used to access a site. The descriptions of the paths
are generated in graphviz format, for use with 'dot'.
I found that these weren't always appropriate for the site, so I
made some modifications. Initially I used sed:
sed -i s/rankdir=LR/rankdir=TB/ $OUTDIR/visitors.dot
Changes the ordering to be vertical, rather than horizontal.
This looks better for sites which are linear, rather than
all stemming from a root node.
sed -i 's!\("/riscos[^ ]*"\)\( \[.*\)!\1\2\n\1 [color="#ffddff"]!' \
Make all the nodes in the '/riscos' section of the site a
pink, rather than the default blue. This makes it easier to
locate different parts of the site.
sed -i 's!\("/riscos/ramble/\([^ ]*\)"\)\( \[.*\)!\1\3\n\1 [color="#ffddff" label="\2"]!' \
Make all the nodes in the '/risos/ramble/' section of the
site coloured pink, and change their text to only use the
tail of the path. This reduces the amount of space used by
those parts of the site.
However, these replacements became a little unwieldy as more were
added, and I wanted more control over the graphs.
Performs any of the above operations, and also allows you to
make the lines thicker based on how common the paths are. This
makes the common paths thicken up, and so look much clearer
in the graph. Additionally it is possible to use the 'weighted'
option for graphviz, which forces the higher weights (the
common lines) to be more linear than the other lines. This can
force a complex graph to have simpler lines.
An graph produced by visitors, and its associated PNG generated from
the graph file by 'dot', and the same graph after processing by the
widen-lines.pl script. Specifically the following command:
./widen-lines.pl -toptobottom \
-colour /riscos/=#ffddff \
-label '/riscos/ramble/(.*)=$1' \