X-Git-Url: https://git.openstreetmap.org/dns.git/blobdiff_plain/5314f32a223d04a13d80ad3f3bd98b543d26733e..9deb6ee0d0a19d90e7ef6a2e34c736467843226f:/bin/sumlogs diff --git a/bin/sumlogs b/bin/sumlogs index c46bcba..e342adc 100755 --- a/bin/sumlogs +++ b/bin/sumlogs @@ -7,6 +7,7 @@ use Geo::IP; use YAML; my $gi = Geo::IP->open("/usr/share/GeoIP/GeoIP.dat", GEOIP_MEMORY_CACHE); +my $total_bandwidth = 560 * 1024 * 1024; my $total_bytes = 0; my %country_bytes; @@ -45,7 +46,7 @@ my %country_bandwidth; while (my($country,$bytes) = each %country_bytes) { - $country_bandwidth{$country} = $bytes * 300 * 1024 * 1024 / $total_bytes; + $country_bandwidth{$country} = $bytes * $total_bandwidth / $total_bytes; } print Dump(\%country_bandwidth);