Code Monkey home page Code Monkey logo

egeoip's People

Contributors

chrisavl avatar doubleyou avatar emad avatar etrepum avatar faal avatar gleber avatar lemenkov avatar lpgauth avatar rj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

egeoip's Issues

Region code is not always a binary string.

Region code is sometime returned as an integer?

egeoip:lookup("247.253.22.96").
{ok,{geoip,"CG","COG","Congo", <<16>>, <<>>,<<>>,-27.0,133.0,0,0}}

From http://www.maxmind.com/app/city, region should be char(2)...

State/Region    
char(2) 
For US/Canada, ISO-3166-2 code for the state/province name, with the addition of AA, AE, and AP for Armed Forces America, Europe and Pacific. Outside of the US and Canada, FIPS 10-4 code. Region name lookups are available in selected APIs

crash when parsing /usr/share/GeoIP/GeoIP.dat

14:06:42.593 [error] CRASH REPORT Process <0.117.0> with 0 neighbours exited with reason: no function clause matching egeoip:read_segments(1, <<1,0,0,123,0,0,2,0,0,62,0,0,3,0,0,31,0,0,4,0,0,18,0,0,5,0,0,11,0,0,6,0,0,9,0,0,7,0,0,8,0,0,0,255,...>>, 827301) line 486 in gen_server:init_it/6 line 330
14:06:42.594 [error] Supervisor egeoip_sup had child egeoip_0 started with egeoip:start_link(egeoip_0, ["/usr/share/GeoIP/GeoIP.dat"]) at undefined exit with reason no function clause matching egeoip:read_segments(1, <<1,0,0,123,0,0,2,0,0,62,0,0,3,0,0,31,0,0,4,0,0,18,0,0,5,0,0,11,0,0,6,0,0,9,0,0,7,0,0,8,0,0,0,255,...>>, 827301) line 486 in context start_error
14:06:42.595 [error] CRASH REPORT Process <0.114.0> with 0 neighbours exited with reason: {{shutdown,{failed_to_start_child,egeoip_0,{function_clause,[{egeoip,read_segments,[1,<<1,0,0,123,0,0,2,0,0,62,0,0,3,0,0,31,0,0,4,0,0,18,0,0,5,0,0,11,0,0,6,0,0,9,0,0,7,0,0,8,0,0,0,255,255,171,0,0,10,1,0,211,1,0,10,0,0,225,255,255,235,1,0,141,2,0,12,0,0,15,0,0,13,0,0,14,0,0,49,9,0,153,9,0,0,255,255,225,255,255,16,0,0,17,0,0,162,9,0,90,10,0,123,10,0,218,10,0,19,0,0,25,0,0,20,0,0,22,0,0,21,0,0,225,255,255,225,255,255,153,11,0,23,0,0,24,0,0,81,12,0,225,255,255,225,255,255,242,12,0,26,0,0,29,0,...>>,...],...},...]}}},...} in application_master:init/4 line 133
14:06:42.595 [info] Application egeoip exited with reason: {{shutdown,{failed_to_start_child,egeoip_0,{function_clause,[{egeoip,read_segments,[1,<<1,0,0,123,0,0,2,0,0,62,0,0,3,0,0,31,0,0,4,0,0,18,0,0,5,0,0,11,0,0,6,0,0,9,0,0,7,0,0,8,0,0,0,255,255,171,0,0,10,1,0,211,1,0,10,0,0,225,255,255,235,1,0,141,2,0,12,0,0,15,0,0,13,0,0,14,0,0,49,9,0,153,9,0,0,255,255,225,255,255,16,0,0,17,0,0,162,9,0,90,10,0,123,10,0,218,10,0,19,0,0,25,0,0,20,0,0,22,0,0,21,0,0,225,255,255,225,255,255,153,11,0,23,0,0,24,0,0,81,12,0,225,255,255,225,255,255,242,12,0,26,0,0,29,0,...>>,...],...},...]}}},...} 

Version
Name : GeoIP
Arch : x86_64
Version : 1.4.8
Release : 1.5.amzn1
Size : 1.5 M
Repo : installed
From repo : amzn-main
Summary : C library for country/city/organization to IP address or hostname mapping
URL : http://www.maxmind.com/app/c
License : LGPLv2+
Description : GeoIP is a C library that enables the user to find the country that any IP
: address or hostname originates from. It uses a file based database that is
: accurate as of March 2003. This database simply contains IP blocks as keys, and
: countries as values. This database should be more complete and accurate than
: using reverse DNS lookups.

Quite big memory footprint. Is this normal?

I just started using egeoip and the reserved memory of the erlang VM went up from ~60MB to ~270MB
on 64 bit erlang 17.3

Not that it's a huge problem, just asking if it's normal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.