ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  A New Visualization for Web Server Logs
Subject:   Works like a charm
Date:   2007-02-09 07:20:51
From:   iconara
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

1 to 2 of 2
  1. Forgot the time format
    2007-02-10 03:28:03  iconara [View]

  2. Works like a charm
    2007-02-09 11:01:13  rajuvarghese [View]

    • Works like a charm
      2007-02-09 12:58:44  bjelkeman [View]

      • I agree: sysadmins have no graphical tools
        2007-02-09 15:20:25  rajuvarghese [View]

        • I agree: sysadmins have no graphical tools
          2007-02-15 13:36:31  ksfiles [View]

1 to 2 of 2