Excuse my ignorance here, I have what is probably a simple question.

I want to pull apart my Apache combined log into individual Vhost reports
that I can run through Analog.

I can manually do this by grepping the file for the vhost name.

What I'd like to do is have a Perl script read the list of directory names
in my Apache root documents folder. These names match the vhost domain
names. Then I would like the Perl script to loop through those names and
create a report for each one.

I have created this script which shows me a list of all vhost directories in
the Apache root folder:

#!/usr/bin/perl -w

$dirname = '/webroot/';
opendir(DIR, $dirname) or die "can't opendir $dirname: $!";
while (defined($file = readdir(DIR))) {
print $file,"\n"
}
closedir (DIR);


Can someone give me the next step on how to pull out the Vhost reports
individually?

Here is the shell commands I am using to do this manually:

shell> cat /var/log/httpd/access_log | grep "somedomainname" >
/var/log/httpd/access_log_somedomainname

Thanks guys!
---------------------------------------
Jeremy Schwartz                Starmark
Interactive Developer
[EMAIL PROTECTED]        954-761-1600

Reply via email to