AnyData::Format::Weblog(3pm) User Contributed Perl Documentation AnyData::Format::Weblog(3pm)NAME
AnyData::Format::Weblog - tiedhash & DBI/SQL access to HTTPD Logs
SYNOPSIS
use AnyData;
my $weblog = adTie( 'Weblog', $filename );
while (my $hit = each %$weblog) {
print $hit->{remotehost},"
" if $hit->{request} =~ /mypage.html/;
}
# ... other tied hash operations
OR
use DBI
my $dbh = DBI->connect('dbi:AnyData:');
$dbh->func('hits','Weblog','access_log','ad_catalog');
my $hits = $dbh->selectall_arrayref( qq{
SELECT remotehost FROM hits WHERE request LIKE '%mypage.html%'
});
# ... other DBI/SQL read operations
DESCRIPTION
This is a plug-in format parser for the AnyData and DBD::AnyData modules. You can gain read access to Common Log Format files web server
log files (e.g. NCSA or Apache) either through tied hashes or arrays or through SQL database queries.
Fieldnames are taken from the W3 definitions found at
http://www.w3.org/Daemon/User/Config/Logging.html#common-logfile-format
remotehost
usernname
authuser
date
request
status
bytes
In addition, two extra fields that may be present in extended format logfiles are:
referer
client
This module does not currently support writing to weblog files.
Please refer to the documentation for AnyData.pm and DBD::AnyData.pm for further details.
AUTHOR & COPYRIGHT
copyright 2000, Jeff Zucker <jeff@vpservices.com> all rights reserved
perl v5.10.1 2004-08-17 AnyData::Format::Weblog(3pm)
Check Out this Related Man Page
AnyData::Format::CSV(3pm) User Contributed Perl Documentation AnyData::Format::CSV(3pm)NAME
AnyData::Format::CSV - tiedhash & DBI/SQL access to CSV data
SYNOPSIS
use AnyData;
my $table = adTable( 'CSV', $filename,'r',$flags );
while (my $row = each %$table) {
print $row->{name},"
" if $row->{country} =~ /us|mx|ca/;
}
# ... other tied hash operations
OR
use DBI
my $dbh = DBI->connect('dbi:AnyData:');
$dbh->func('table1','CSV', $filename,$flags,'ad_catalog');
my $hits = $dbh->selectall_arrayref( qq{
SELECT name FROM table1 WHERE country = 'us'
});
# ... other DBI/SQL operations
DESCRIPTION
This is a plug-in format parser for the AnyData and DBD::AnyData modules. It will read column names from the first row of the file, or
accept names passed by the user. In addition to column names, the user may set other options as follows:
col_names : a comma separated list of column names
eol : the end of record mark,
by default
quote_char : the character used to quote fields " by default
escape_char : the character used to escape the quote char, " by default
If you are using this with DBD::AnyData, put ad_ in front of the flags, e.g. ad_eol.
Please refer to the documentation for AnyData.pm and DBD::AnyData.pm for further details.
AUTHOR & COPYRIGHT
copyright 2000, Jeff Zucker <jeff@vpservices.com> all rights reserved
perl v5.10.1 2004-08-17 AnyData::Format::CSV(3pm)
My apache logs are saved in the following format (using rotatelogs):
Oct 8 01:59 access_log.1002412800
Oct 9 01:55 access_log.1002499200
Oct 10 01:58 access_log.1002585600
Oct 11 01:56 access_log.1002672000
Oct 12 01:59 access_log.1002758400
I would like to run a cronjob once a week to... (2 Replies)
Hi Guys,
How can I get the number of web server hits from the command prompt, I like shell scripting ways of finding such data.
Can anyone help? (1 Reply)
Hi,
can someone help me.
I have some files and search a content in this files. If i have a hit I will print a output:
filename:content
But are more hits in one file: The output is always filename:content
E.G. Seach about "three"
file1 {one, two, three, four, three}
file2... (5 Replies)