<AHREF="index.html#utilities">Return to Main Contents</A><HR>
<P>
<ANAME="lbAB"> </A>
<H2>NAME</H2>
qsgeo - an utility to lookup a client's country code.
<ANAME="lbAC"> </A>
<H2>SYNOPSIS</H2>
qsgeo -d <path> [-l] [-s] [-ip <ip>]
<ANAME="lbAD"> </A>
<H2>DESCRIPTION</H2>
Use this utility to resolve the country codes of IP addresses within existing log files. The utility reads the log file data from stdin and writes them, with the injected country code, to stdout.
<ANAME="lbAE"> </A>
<H2>OPTIONS</H2>
<P>
<DLCOMPACT>
<DT>-d <path><DD>
Specifies the path to the geographical database files (CSV file containing IP address ranges and country codes).
<DT>-s <DD>
Writes a summary of the requests per country only.
<DT>-l <DD>
Writes the database to stdout (ignoring stdin) inserting local (127.*) and private (10.*, 172.16*, 192.168.*) network addresses.
<DT>-ip <ip><DD>
Resolves a single IP address instead of processing a log file.
</DL>
<ANAME="lbAF"> </A>
<H2>EXAMPLE</H2>
Reading the file access.log and adding the country code to the IP address field: