qsgeo - Man Page

an utility to lookup a client's country code.

Synopsis

qsgeo -d <path> [-l] [-s] [-ip <ip>]

Description

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.

Options

-d <path>

Specifies the path to the geographical database files (CSV file containing IP address ranges and country codes).

-s

Writes a summary of the requests per country only.

-l

Writes the database to stdout (ignoring stdin) inserting local (127.*) and private (10.*, 172.16*, 192.168.*) network addresses.

-ip <ip>

Resolves a single IP address instead of processing a log file.

Example

Reading the file access.log and adding the country code to the IP address field:

 cat access.log | qsgeo -d GeoIPCountryWhois.csv

Reading the file access.log and showing a summary only:

 cat access.log | qsgeo -d GeoIPCountryWhois.csv -s

Resolving a single IP address:

 qsgeo -d GeoIPCountryWhois.csv -ip 192.84.12.23

See Also

qsdt(1), qsexec(1), qsfilter2(1), qsgrep(1), qshead(1), qslog(1), qslogger(1), qspng(1), qsre(1), qsrespeed(1), qsrotate(1), qssign(1), qstail(1)

Author

Pascal Buchbinder, http://mod-qos.sourceforge.net/

Referenced By

qsdt(1), qsexec(1), qsfilter2(1), qsgrep(1), qshead(1), qslog(1), qslogger(1), qspng(1), qsre(1), qsrespeed(1), qsrotate(1), qssign(1), qstail(1).

May 2023 mod_qos utilities 11.74 qsgeo man page