Sillium
05-06-2009, 07:21
Hi everybody!
Some people at our forums wanted to know where do the people come from who connect to our server, so I wrote a command line application to parse the log files and create a statistic.
If you want to use it you need the GeoIP.dat from maxmind (http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/) and .NET 2.0
Start it like this:
CountryAnalyzer.exe PATH_TO_GEOIP PATH_TO_LOGS
e.g. CountryAnalyzer.exe ./GeoIP.dat ./logsIt will parse through all the log files (*.log) and print a statistic like this:
Total connections: 4394
[Germany, 2718]
[United Kingdom, 333]
[United States, 148]
[Russian Federation, 140]
[Sweden, 135]
[France, 128]
[Finland, 91]
[Italy, 80]
[Netherlands, 69]
[Norway, 69]
[Austria, 63]
[Denmark, 49]
[Switzerland, 36]
[Spain, 34]
[Canada, 34]
[Poland, 33]
[Czech Republic, 31]
[Hungary, 28]
[Belgium, 20]
[Slovakia, 15]
[Ukraine, 15]
[Ireland, 12]
[Israel, 12]
[Bulgaria, 10]
[Slovenia, 10]
[Lithuania, 9]
[Brazil, 7]
[Greece, 7]
[Portugal, 7]
[Estonia, 7]
[Mexico, 5]
[Croatia, 5]
[Latvia, 4]
[Romania, 4]
[Saudi Arabia, 4]
[Iceland, 3]
[Turkey, 3]
[Serbia, 3]
[United Arab Emirates, 2]
[Belarus, 2]
[Gibraltar, 2]
[Luxembourg, 2]
[Thailand, 1]
[Singapore, 1]
[Australia, 1]
[Aland Islands, 1]
[Qatar, 1]I only tested it with TF2 logs! If you try it with anything else and run into an error let me know and send me the log file :-)
Some people at our forums wanted to know where do the people come from who connect to our server, so I wrote a command line application to parse the log files and create a statistic.
If you want to use it you need the GeoIP.dat from maxmind (http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/) and .NET 2.0
Start it like this:
CountryAnalyzer.exe PATH_TO_GEOIP PATH_TO_LOGS
e.g. CountryAnalyzer.exe ./GeoIP.dat ./logsIt will parse through all the log files (*.log) and print a statistic like this:
Total connections: 4394
[Germany, 2718]
[United Kingdom, 333]
[United States, 148]
[Russian Federation, 140]
[Sweden, 135]
[France, 128]
[Finland, 91]
[Italy, 80]
[Netherlands, 69]
[Norway, 69]
[Austria, 63]
[Denmark, 49]
[Switzerland, 36]
[Spain, 34]
[Canada, 34]
[Poland, 33]
[Czech Republic, 31]
[Hungary, 28]
[Belgium, 20]
[Slovakia, 15]
[Ukraine, 15]
[Ireland, 12]
[Israel, 12]
[Bulgaria, 10]
[Slovenia, 10]
[Lithuania, 9]
[Brazil, 7]
[Greece, 7]
[Portugal, 7]
[Estonia, 7]
[Mexico, 5]
[Croatia, 5]
[Latvia, 4]
[Romania, 4]
[Saudi Arabia, 4]
[Iceland, 3]
[Turkey, 3]
[Serbia, 3]
[United Arab Emirates, 2]
[Belarus, 2]
[Gibraltar, 2]
[Luxembourg, 2]
[Thailand, 1]
[Singapore, 1]
[Australia, 1]
[Aland Islands, 1]
[Qatar, 1]I only tested it with TF2 logs! If you try it with anything else and run into an error let me know and send me the log file :-)