list_hostnames.pl - List hostsnames from a mysql squid log
list_hostnames.pl > hosts.csv
list_hostnames.pl /////password > hosts.csv
list_hostnames.pl /mysql_host/mysql_database/table_name/username/password > hosts.csv
This script prints the hostname part of the request_url
field of each entry in a mysql squid access log, along with the number of requests to that hostname. The list is sorted by number of request in descending order, so the hottest sites come first.
The output format is CSV (Comma Separated Values). The first field is the hostname, surrounded by double quotes, the second field is the number of requests, unquoted.
Normally all hosts are printed, including those with only a few (or even only one) requests. If this option is specified, sites with only one request are not printed, but summed up in a 'others' entry, always printed last.
If you want to group sites with more than one request, use the --group-threshold option, described below.
Number of request that a site must have to be included in the ``others'' entry. If not specified, defaults to 1.
Only useful if --group-cold-sites is specified.
If specified, the ``others'' entry is not displayed.
Only useful if --group-cold-sites is specified.
logfile-daemon_mysql.pl
Marcello Romani, marcello.romani@libero.it
Copyright (C) 2008 by Marcello Romani
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.