cvs commit: jakarta-tomcat-connectors/jk/tools/reports tomcat_trend.pl
glenn 2005/04/09 08:24:44 Modified:jk/tools/reports tomcat_trend.pl Log: Update to support changes to error logging string format Revision ChangesPath 1.10 +4 -4 jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl Index: tomcat_trend.pl === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- tomcat_trend.pl 7 Feb 2005 14:49:55 - 1.9 +++ tomcat_trend.pl 9 Apr 2005 15:24:44 - 1.10 @@ -192,7 +192,7 @@ # Stop processing if logtime is today last if( $logtime = $curdate ); - if( $line =~ /\d\)\]: / ) { + if( $line =~ /\d\)\]{0,1}: / ) { # Handle a mod_jk error if( $line =~ /(jk_tcp_socket_recvfull failed|ERROR: Receiving from tomcat failed)/ ) { $Global{tomcat_full}++; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/tools/reports tomcat_trend.pl
glenn 2005/02/07 06:49:55 Modified:jk/tools/reports tomcat_trend.pl Log: Fix a date bug Revision ChangesPath 1.9 +11 -3 jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl Index: tomcat_trend.pl === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- tomcat_trend.pl 24 Feb 2004 08:42:04 - 1.8 +++ tomcat_trend.pl 7 Feb 2005 14:49:55 - 1.9 @@ -72,6 +72,14 @@ @tail = `tail -1 $archivedir/global.data`; $startdate = (split /\s+/,$tail[0])[0]; ($day, $mon, $year) = (localtime($startdate))[3..5]; + if ($day == 31) { + $day=1; + $month++; + if ($month 11) { + $month=0; + $year++; + } + } $startdate = timelocal(0,0,0,$day+1,$mon,$year); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/tools/reports tomcat_trend.pl tomcat_reports.pl
hgomez 2004/02/24 00:42:04 Modified:jk/tools/reports tomcat_trend.pl tomcat_reports.pl Log: Update to Apache License 2.0 Revision ChangesPath 1.8 +18 -59jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl Index: tomcat_trend.pl === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- tomcat_trend.pl 5 Nov 2003 09:14:40 - 1.7 +++ tomcat_trend.pl 24 Feb 2004 08:42:04 - 1.8 @@ -1,61 +1,20 @@ #!/usr/local/bin/perl -# = -# -# The Apache Software License, Version 1.1 -# -# Copyright (c) 1999-2003 The Apache Software Foundation. -# All rights reserved. -# -# = -# -# Redistribution and use in source and binary forms, with or without modi- -# fication, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice -#notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -#notice, this list of conditions and the following disclaimer in the -#documentation and/or other materials provided with the distribution. -# -# 3. The end-user documentation included with the redistribution, if any, -#must include the following acknowlegement: -# -# This product includes software developed by the Apache Software -#Foundation http://www.apache.org/. -# -#Alternately, this acknowlegement may appear in the software itself, if -#and wherever such third-party acknowlegements normally appear. -# -# 4. The names The Jakarta Project, Jk, and Apache Software -#Foundation must not be used to endorse or promote products derived -#from this software without prior written permission. For written -#permission, please contact [EMAIL PROTECTED]. -# -# 5. Products derived from this software may not be called Apache nor may -#Apache appear in their names without prior written permission of the -#Apache Software Foundation. -# -# THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESSED OR IMPLIED WARRANTIES -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -# THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -# = -# -# This software consists of voluntary contributions made by many indivi- -# duals on behalf of the Apache Software Foundation. For more information -# on the Apache Software Foundation, please see http://www.apache.org/. -#
cvs commit: jakarta-tomcat-connectors/jk/tools/reports tomcat_trend.pl tomcat_reports.pl
hgomez 2003/11/05 01:14:40 Modified:jk/tools/reports tomcat_trend.pl tomcat_reports.pl Log: Update copyright notice Revision ChangesPath 1.7 +4 -4 jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl Index: tomcat_trend.pl === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- tomcat_trend.pl 6 Sep 2003 17:44:14 - 1.6 +++ tomcat_trend.pl 5 Nov 2003 09:14:40 - 1.7 @@ -4,7 +4,7 @@ # # The Apache Software License, Version 1.1 # -# Copyright (c) 1999-2001 The Apache Software Foundation. +# Copyright (c) 1999-2003 The Apache Software Foundation. # All rights reserved. # # = 1.3 +4 -4 jakarta-tomcat-connectors/jk/tools/reports/tomcat_reports.pl Index: tomcat_reports.pl === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/tools/reports/tomcat_reports.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- tomcat_reports.pl 25 Jul 2003 14:00:20 - 1.2 +++ tomcat_reports.pl 5 Nov 2003 09:14:40 - 1.3 @@ -4,7 +4,7 @@ # # The Apache Software License, Version 1.1 # -# Copyright (c) 1999-2001 The Apache Software Foundation. +# Copyright (c) 1999-2003 The Apache Software Foundation. # All rights reserved. # # = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/tools/reports tomcat_trend.pl
glenn 2003/09/06 10:44:14 Modified:jk/tools/reports tomcat_trend.pl Log: Cleanup debug and minor bug fix Revision ChangesPath 1.6 +11 -24jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl Index: tomcat_trend.pl === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- tomcat_trend.pl 3 Jul 2003 14:41:12 - 1.5 +++ tomcat_trend.pl 6 Sep 2003 17:44:14 - 1.6 @@ -110,7 +110,6 @@ if( -e $archivedir/global.data ) { # Get the start date from the last entry in global.data - # print Checking global.data for startdate\n; @tail = `tail -1 $archivedir/global.data`; $startdate = (split /\s+/,$tail[0])[0]; ($day, $mon, $year) = (localtime($startdate))[3..5]; @@ -132,10 +131,7 @@ ($mon, $day, $time, $year) = (split /\s+/,$head[0])[1..4]; ($hour, $min, $sec) = split /:/,$time; $year =~ s/\]$//; - # print $head[0]\n; - # print $mon $day $time $year $hour $min $sec\n; $logtime = timelocal($sec,$min,$hour,$day,$MON{$mon},$year-1900); - # print $logfile $logtime . scalar(localtime($logtime)) . \n; $modjklog{$logtime} = $logfile; } @@ -166,14 +162,16 @@ } print StartDate: . scalar(localtime($startdate)) . \n; +$processdate = $startdate; foreach $key ( sort {$a = $b} keys %modjklog ) { - last if( $key = $curdate ); + $logtime = $processdate; $logfile = $modjklog{$key}; + print Processing log: $logfile\n; + last if( $key = $curdate ); $fh = new FileHandle $logfile; die Open of logfile $logfile failed: $! unless defined $fh; - print Processing log: $logfile\n; while( $line = $fh-getline) { chomp($line); ($mon, $day, $time, $year) = (split /\s+/,$line)[1..4]; @@ -183,15 +181,12 @@ print Unknown log entry: $origline\n unless $origline =~ /\.c /; next; } - # print $mon $day $time $year $hour $min $sec\n; $logtime = timelocal($sec,$min,$hour,$day,$MON{$mon},$year-1900); - if( $logtime $startdate ) { + if( $logtime $processdate ) { $origline = $line; # Strip off the leading date and time - # print $line\n; $line =~ s/^\[.*\] //; - # print $line\n; # See if this is a new 5 minute period $interval = int($logtime/300); @@ -212,7 +207,7 @@ # See if this is a new day if( $day != $prevday ) { if( defined $prevday ) { - DailyStats($startdate,\%Global); + DailyStats($processdate,\%Global); } undef %Global; undef %GlobalWorkers; @@ -224,7 +219,7 @@ $Global{workers} = \%GlobalWorkers; $Global{errors} = ; $prevday = $day; -$startdate = $logtime; +$processdate = $logtime; } # Stop processing if logtime is today @@ -232,7 +227,6 @@ if( $line =~ /\d\)\]: / ) { # Handle a mod_jk error -# print mod_jk error! . scalar(localtime($logtime)) . $line\n; if( $line =~ /(jk_tcp_socket_recvfull failed|ERROR: Receiving from tomcat failed)/ ) { $Global{tomcat_full}++; $Interval{tomcat_full}++; @@ -243,19 +237,13 @@ next; } else { # Handle a mod_jk request log entry -# print $line\n; $line =~ s/^\[.*\] //; -# print $line\n; $line =~ s/\(GET|POST|OPTIONS|HEAD)[^\]*\ //; -# print $line\n; $line =~ s/[\?\;].*\//; -# print $line\n; $line =~ s/\//g; -# print $line\n; ($work, $host, $page, $status, $latency) = split /\s+/,$line; $page =~ s/\/\//\//g; $page =~ s/\.\//\//g; -# print scalar(localtime($logtime)) . $work $host $page $status $latency\n; if( length($work) = 0 || length($host) = 0 || length($page) = 0 || $status !~ /^\d+$/ || $latency !~ /^\d+\.\d+$/ ) { print Unknown log entry: $origline\n unless $origline =~ /\.c /; @@ -324,7 +312,6 @@ } $hoster = $$worker{hosts}{$host}; push @{$$hoster{latency}},$latency; - } } } @@ -335,7 +322,7 @@ # output the last days data if( $logtime $curdate ) { IntervalStats(\%Global,\%Interval,$previnterval*300); - DailyStats($startdate,\%Global); + DailyStats($processdate,\%Global); } exit;
cvs commit: jakarta-tomcat-connectors/jk/tools/reports tomcat_trend.pl
glenn 2003/07/03 07:41:12 Modified:jk/tools/reports tomcat_trend.pl Log: Prevent script from failing on bad date format Revision ChangesPath 1.5 +7 -3 jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl Index: tomcat_trend.pl === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- tomcat_trend.pl 14 Mar 2003 13:36:58 - 1.4 +++ tomcat_trend.pl 3 Jul 2003 14:41:12 - 1.5 @@ -179,6 +179,10 @@ ($mon, $day, $time, $year) = (split /\s+/,$line)[1..4]; ($hour, $min, $sec) = split /:/,$time; $year =~ s/\]$//; + if( $day !~ /^\d+/ || $hour !~ /^\d+/ || $min!~ /^\d+/ || $sec !~ /^\d+/ ) { + print Unknown log entry: $origline\n unless $origline =~ /\.c /; + next; + } # print $mon $day $time $year $hour $min $sec\n; $logtime = timelocal($sec,$min,$hour,$day,$MON{$mon},$year-1900); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-connectors/jk/tools/reports tomcat_trend.pl
[EMAIL PROTECTED] a écrit : glenn 2003/07/03 07:41:12 Modified:jk/tools/reports tomcat_trend.pl Log: Prevent script from failing on bad date format Revision ChangesPath 1.5 +7 -3 jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl Index: tomcat_trend.pl === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- tomcat_trend.pl 14 Mar 2003 13:36:58 - 1.4 +++ tomcat_trend.pl 3 Jul 2003 14:41:12 - 1.5 @@ -179,6 +179,10 @@ ($mon, $day, $time, $year) = (split /\s+/,$line)[1..4]; ($hour, $min, $sec) = split /:/,$time; $year =~ s/\]$//; + if( $day !~ /^\d+/ || $hour !~ /^\d+/ || $min!~ /^\d+/ || $sec !~ /^\d+/ ) { + print Unknown log entry: $origline\n unless $origline =~ /\.c /; + next; + } # print $mon $day $time $year $hour $min $sec\n; $logtime = timelocal($sec,$min,$hour,$day,$MON{$mon},$year-1900); Will it be included in JK 1.2.5 release ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-connectors/jk/tools/reports tomcat_trend.pl
Henri Gomez wrote: [EMAIL PROTECTED] a écrit : glenn 2003/07/03 07:41:12 Modified:jk/tools/reports tomcat_trend.pl Log: Prevent script from failing on bad date format Revision ChangesPath 1.5 +7 -3 jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl Index: tomcat_trend.pl === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- tomcat_trend.pl14 Mar 2003 13:36:58 -1.4 +++ tomcat_trend.pl3 Jul 2003 14:41:12 -1.5 @@ -179,6 +179,10 @@ ($mon, $day, $time, $year) = (split /\s+/,$line)[1..4]; ($hour, $min, $sec) = split /:/,$time; $year =~ s/\]$//; + if( $day !~ /^\d+/ || $hour !~ /^\d+/ || $min!~ /^\d+/ || $sec !~ /^\d+/ ) { + print Unknown log entry: $origline\n unless $origline =~ /\.c /; + next; + } # print $mon $day $time $year $hour $min $sec\n; $logtime = timelocal($sec,$min,$hour,$day,$MON{$mon},$year-1900); Will it be included in JK 1.2.5 release ? Yeah, I'll regenerate the source dist when everyone has finished their testing and we have a VOTE to do the mod_jk 1.2.5 release. Glenn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/tools/reports tomcat_trend.pl
glenn 2003/03/14 05:36:58 Modified:jk/tools/reports tomcat_trend.pl Log: Update script for mod_jk changes Revision ChangesPath 1.4 +4 -4 jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl Index: tomcat_trend.pl === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- tomcat_trend.pl 31 Dec 2002 04:19:31 - 1.3 +++ tomcat_trend.pl 14 Mar 2003 13:36:58 - 1.4 @@ -232,7 +232,7 @@ if( $line =~ /(jk_tcp_socket_recvfull failed|ERROR: Receiving from tomcat failed)/ ) { $Global{tomcat_full}++; $Interval{tomcat_full}++; -} elsif( $line =~ /(ajp_process_callback - write failed|ERROR sending data to client. Connection aborted or network problems)/ ) { +} elsif( $line =~ /(ajp_process_callback - write failed|ERROR sending data to client. Connection aborted or network problems|Client connection aborted or network problems)/ ) { $Global{client_gone}++; $Interval{client_gone}++; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/tools/reports tomcat_trend.pl
glenn 2002/12/30 20:19:31 Modified:jk/tools/reports tomcat_trend.pl Log: Update for mod_jk log changes Revision ChangesPath 1.3 +5 -4 jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl Index: tomcat_trend.pl === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- tomcat_trend.pl 16 Dec 2002 13:55:46 - 1.2 +++ tomcat_trend.pl 31 Dec 2002 04:19:31 - 1.3 @@ -127,6 +127,7 @@ foreach( @logs ) { $logfile = $_; chomp($logfile); + next if ( $logfile =~ /\.(bz2|gz|zip)$/ ); @head = `head -1 $logfile`; ($mon, $day, $time, $year) = (split /\s+/,$head[0])[1..4]; ($hour, $min, $sec) = split /:/,$time; @@ -228,7 +229,7 @@ if( $line =~ /\d\)\]: / ) { # Handle a mod_jk error # print mod_jk error! . scalar(localtime($logtime)) . $line\n; -if( $line =~ /jk_tcp_socket_recvfull failed/ ) { +if( $line =~ /(jk_tcp_socket_recvfull failed|ERROR: Receiving from tomcat failed)/ ) { $Global{tomcat_full}++; $Interval{tomcat_full}++; } elsif( $line =~ /(ajp_process_callback - write failed|ERROR sending data to client. Connection aborted or network problems)/ ) { -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/tools/reports tomcat_trend.pl
glenn 2002/12/16 05:55:46 Modified:jk/tools/reports tomcat_trend.pl Log: Update script to support changed logging of aborted requests Revision ChangesPath 1.2 +4 -4 jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl Index: tomcat_trend.pl === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/tools/reports/tomcat_trend.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- tomcat_trend.pl 1 Nov 2002 17:41:04 - 1.1 +++ tomcat_trend.pl 16 Dec 2002 13:55:46 - 1.2 @@ -231,7 +231,7 @@ if( $line =~ /jk_tcp_socket_recvfull failed/ ) { $Global{tomcat_full}++; $Interval{tomcat_full}++; -} elsif( $line =~ /ajp_process_callback - write failed/ ) { +} elsif( $line =~ /(ajp_process_callback - write failed|ERROR sending data to client. Connection aborted or network problems)/ ) { $Global{client_gone}++; $Interval{client_gone}++; } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]