$| = 1;
-# Global variables overriden during install
+# Global variables overridden during install
my $JQGRAPH = 1;
# Command line options
my %prefix_vars = ();
# Do not display data in pie where percentage is lower than this value
-# to avoid label overlaping.
+# to avoid label overlapping.
my $pie_percentage_limit = 2;
# Get the decimal separator
$img_format = 'png' if ($img_format ne 'jpeg');
# Extract the output directory from outfile so that graphs will
-# be created in the same directoty
+# be created in the same directory
my @infs = fileparse($outfile);
$outdir = $infs[1] . '/';
push(@exclude_query, @exclq);
}
-# Testing regex syntaxe
+# Testing regex syntax
if ($#exclude_query >= 0) {
foreach my $r (@exclude_query) {
&check_regex($r, '--exclude-query');
push(@include_query, @exclq);
}
-# Testing regex syntaxe
+# Testing regex syntax
if ($#include_query >= 0) {
foreach my $r (@include_query) {
&check_regex($r, '--include-query');
my $orphan_syslog_line = qr/^(...)\s+(\d+)\s(\d+):(\d+):(\d+)(?:\s[^\s]+)?\s([^\s]+)\s([^\s\[]+)\[(\d+)\]:/;
my $orphan_stderr_line = qr/[^']*\d+-\d+-\d+\s\d+:\d+:\d+[\.\d]*\s[^\s]+[^']*/;
-# Compile custom log line prefie prefix
+# Compile custom log line prefix prefix
my @prefix_params = ();
if ($log_line_prefix) {
@prefix_params = &build_log_line_prefix_regex();
my $t1 = Benchmark->new;
my $td = timediff($t1, $t0);
-&logmsg('DEBUG', "the log statistics gathering tooks:" . timestr($td));
+&logmsg('DEBUG', "the log statistics gathering took:" . timestr($td));
&logmsg('DEBUG', "Ok, generating $extension report...");
my $t2 = Benchmark->new;
$td = timediff($t2, $t1);
-&logmsg('DEBUG', "the generating of reports tooks:" . timestr($td));
+&logmsg('DEBUG', "the report generating took:" . timestr($td));
$td = timediff($t2, $t0);
-&logmsg('DEBUG', "the total execution time tooks:" . timestr($td));
+&logmsg('DEBUG', "the total execution time took:" . timestr($td));
exit 0;
--include-file filename: path of the file which contains all the regex of the
queries to include from the report. One regex per line.
--disable-error : do not generate error report.
- --disable-hourly : do not generate hourly reports.
+ --disable-hourly : do not generate hourly report.
--disable-type : do not generate query type report.
- --disable-query : do not generate queries reports (slowest, most
+ --disable-query : do not generate query reports (slowest, most
frequent, ...).
--disable-session : do not generate session report.
--disable-connection : do not generate connection report.
$orig_query = lc($orig_query);
- # Remove extra space, new line and tab caracters by a single space
+ # Remove extra space, new line and tab characters by a single space
$orig_query =~ s/[\t\s\r\n]+/ /gs;
# Remove string content
if (scalar keys %logs_type > 0) {
- # Show log' types
+ # Show log types
print $fh qq{
<h2 id="LogsTypeReport">Logs per type <a href="#top" title="Back to top">^</a></h2>
<table>
# Store a counter of logs type
$logs_type{$prefix_vars{'t_loglevel'}}++;
- # Replace syslog tablulation rewrite
+ # Replace syslog tabulation rewrite
$prefix_vars{'t_query'} =~ s/#011/\t/g if ($format =~ /syslog/);
my $date_part = "$prefix_vars{'t_year'}$prefix_vars{'t_month'}$prefix_vars{'t_day'}";
next if (!$line);
$nline++;
- # Is syslog lines ?
+ # Are syslog lines ?
if ($line =~
/^[A-Z][a-z]{2}\s+\d+\s\d+:\d+:\d+(?:\s[^\s]+)?\s[^\s]+\s([^\s\[]+)\[\d+\]:(?:\s\[[^\]]+\])?\s\[\d+\-\d+\].*?(LOG|WARNING|ERROR|FATAL|PANIC|DETAIL|STATEMENT|HINT|CONTEXT):\s+$duration/
)
$nfound++;
$ident_name{$1}++;
- # Is stderr lines
+ # Are stderr lines ?
} elsif (
(
$line =~
} elsif (($logf =~ /\.zip/i) && ($zcat =~ /^zcat$/)) {
$uncompress = $ucat;
}
- &logmsg('DEBUG', "Compressed log file, will used command: $uncompress \"$logf\"");
+ &logmsg('DEBUG', "Compressed log file, will use command: $uncompress \"$logf\"");
# Open a pipe to zcat program for compressed log
open($lfile,"$uncompress \"$logf\" |") || die "FATAL: cannot read from pipe to $uncompress \"$logf\". $!\n";
- # Real size of the file is unknow, try to find it
+ # Real size of the file is unknown, try to find it
my $cmd_file_size = $uncompress_size;
$cmd_file_size =~ s/\%f/$logf/g;
$totalsize = `$cmd_file_size`;