Made by a recent Michigan Technological University grad, distmap is a python script that uses google maps to display points on a world map showing the origin of users who have accessed your files/distributions. This script is extremely useful for mirrors like how it is currently used over at the Linux Users Group of MTU.
Dependencies: GeoIP, PyMaps, and apachelog.
Set your mirrors and any other settings toward the top of the file.
Also set your locations:
GEOIPDB = "/usr/local/share/GeoIP/GeoIPCity.dat" APACHELOG = '/var/log/apache2/access.log' VSFTPDLOG = '/var/log/vsftpd/access.log' RSYNCDLOG = '/var/log/rsyncd/access.log' OUTPUTHTML = '/var/www/default/html/map/map.html' HOMELATLONG = (47.1544,-88.6471) GMAPAPIKEY = ''
Using cron, you can keep the geoip db up to date:
cd ~; wget -N -q http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz; gunzip GeoLiteCity.dat.gz;mv GeoLiteCity.dat /usr/local/share/GeoIP/GeoIPCity.dat
And then set it up to run as often as you want fresh stats (using cron).
I have not actually deployed it yet but if I run into any hickups, I’ll report back.