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.
Set your mirrors and any other settings toward the top of the file.
Also set your locations:
GEOIP_DB = “/usr/local/share/GeoIP/GeoIPCity.dat” APACHE_LOG = ‘/var/log/apache2/access.log’ VSFTPD_LOG = ‘/var/log/vsftpd/access.log’ RSYNCD_LOG = ‘/var/log/rsyncd/access.log’ OUTPUT_HTML = ‘/var/www/default/html/map/map.html’ HOME_LATLONG = (47.1544,-88.6471) GMAP_API_KEY = “
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.