|
Very good idea, and an excellent article. I adapted your scripts to work with my IIS-generated log files:
while ( <> ) {
# IIS log files have comments which start with "#", skip those
next if /^#/;
chomp;
# this is the IIS log format, it may vary, but it prints the format as a comment at the beginning of the file
my (undef, $time, $ip, undef, undef, undef, undef, undef, undef, $url, undef, $sc) = split;
next if ($url =~ /(gif|jpg|png|js|css)$/);
// no need to reformat the time so I removed that line
print TEMP "$time $ip $url $sc\n";
$ipList{$ip}++;
$urlList{$url}++;
}
And I also added this to the gnuplot-commands to make it create a png (add before "splot ..."):
set output "plot.png"
set terminal png
|