====== listgraph.cgi ====== //listgraph.cgi// is a web-frontend to render and display Email message statistics. An example is online at [[http://stats.linuxaudio.org/cgi-bin/listgraph.cgi|linuxaudio.org]]. ===== About ===== {{:oss:listgraph:listgraph_examle.png?350 }} Listgraph is a perl CGI script based on [[http://mailgraph.schweikert.ch/|mailgraph]] by David Schweikert using the [[http://oss.oetiker.ch/rrdtool/|RRDtool]] round-robin-database by T.Oetiker for data storage. Besides the CGI script (which generates and caches the images) there is a perl-script to write RRD from mbox data (here: [[http://www.list.org|mailman]] mboxes) which is invoked once a day by [[wp>cron]]. ===== Sources ===== The configuration (paths, title, etc) is pragmatically included in the CGI executable and requires a bit of tinkering: colors and grid-boundaries have been optimized and hardcoded. Invoke ''mbox2rrd.pl '' to write ''/var/lib/listgraph/.rrd''((default path used by listgraph.cgi)) database. - mbox2rrd counts the total number of emails (actually it takes the Date from ''From: .*'' lines) in the given mail box and is gauged to "messages per day". //Note//: mbox2rrd.pl must have permissions to read the mbox file and write to the rrd file, in turn this rrd file must be readable by the CGI script (www-user). last but not least the cgi-script writes/caches images to ''/var/cache/listgraph/''. The paths are configured in the header section of both scripts. Download {{:oss:listgraph:listgraph.pl|listgraph.cgi}}, {{:oss:listgraph:mboxparse.pl|mbox2rrd.pl}} extern>http://gareus.org/_media/oss/listgraph/listgraph.pl extern>http://gareus.org/_media/oss/listgraph/mbox2rrd.pl {{tag>FLOSS WWW}}