For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > March 2004 > noob needs help









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author noob needs help
Christopher Gallimore

2004-03-26, 11:15 pm

Being a total Perl noob I get tasked with some log parsing duties. The
project involves parsing the apache access log. What I need to be able
to do is get the "time served" data per hour per page.=20

Something like: script.pl <url> <time> would return all the logged
instances of that url and how long it took to serve each page for the
time requested. I was able to pull that data out using awk into a flat
file, however that's not as efficient as having Perl read thru the file
and store the data on the fly.. I just have no idea how to start.. does
anyone have any ideas on this?




Randal L. Schwartz

2004-03-26, 11:15 pm

>>>>> "Christopher" == Christopher Gallimore <christopher.gallimore@attws.com> writes:

Christopher> Being a total Perl noob I get tasked with some log
Christopher> parsing duties. The project involves parsing the apache
Christopher> access log. What I need to be able to do is get the "time
Christopher> served" data per hour per page.

Either get Analog (for speedy parsing with lots of options,
www.analog.cx), or roll something yourself with Apache::Log (a module
you can find in the CPAN).

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com