.sql .nu0 {color: #cc66cc;}
.sql span.xtra { display:block; }
-#queriespersecond_graph, #connectionspersecond_graph, #allqueries_graph, #checkpointwritebuffers_graph, #checkpointfiles_graph, #temporaryfile_graph, #selectqueries_graph, #writequeries_graph {
+#queriespersecond_graph, #connectionspersecond_graph, #allqueries_graph, #checkpointwritebuffers_graph, #checkpointfiles_graph, #temporaryfile_graph, #autovacuum_graph, #selectqueries_graph, #writequeries_graph {
width : 1025px;
height: 400px;
background:#F3F2ED;
if (exists $checkpoint_info{warning}) {
print $fh qq{<th colspan="2">Checkpoint warning</th>};
}
+ if (exists $autovacuum_info{chronos}) {
+ print $fh " <th colspan=\"2\">Autovacuum</th>\n";
+ }
if ($tempfile_info{count} || exists $checkpoint_info{chronos}) {
print $fh qq{</tr><tr>};
}
if (exists $checkpoint_info{warning}) {
print $fh qq{<th>Count</th><th>Av. time (sec)</th>};
}
+ if (exists $autovacuum_info{chronos}) {
+ print $fh " <th>VACUUMs</th><th>ANALYZEs</th>\n";
+ }
if ($tempfile_info{count} || exists $checkpoint_info{chronos}) {
print $fh qq{</tr>};
foreach my $d (sort {$a <=> $b} keys %per_hour_info) {
}
}
}
+ if (exists $autovacuum_info{chronos}) {
+ print $fh "<td class=\"right\">", &comma_numbers($autovacuum_info{chronos}{"$d"}{"$h"}{count} || 0), "</td>",
+ "<td class=\"right\">", &comma_numbers($autoanalyze_info{chronos}{"$d"}{"$h"}{count} || 0), "</td>";
+ }
print $fh "</tr>\n";
$c++;
}
$d2 = '';
}
+ # VACUUMs and ANALYZEs
+ if (exists $autovacuum_info{chronos}) {
+ foreach my $tm (sort {$a <=> $b} keys %{$autovacuum_info{chronos}}) {
+ $tm =~ /(\d{4})(\d{2})(\d{2})/;
+ my $y = $1 - 1900;
+ my $mo = $2 - 1;
+ my $d = $3;
+ foreach my $h ("00" .. "23") {
+ my $t = timegm_nocheck(0, 0, $h, $d, $mo, $y) * 1000;
+ next if ($t < $t_min_hour);
+ last if ($t > $t_max_hour);
+ $d1 .= "[$t, " . ($autovacuum_info{chronos}{$tm}{$h}{count} || 0) . "],";
+ $d2 .= "[$t, " . ($autoanalyze_info{chronos}{$tm}{$h}{count} || 0) . "],";
+ }
+ }
+ $d1 =~ s/,$//;
+ $d2 =~ s/,$//;
+ &flotr2_graph(
+ 9, 'autovacuum_graph', $d1, $d2, '', 'Autovacuum actions',
+ '', 'VACUUMs', 'ANALYZEs'
+ );
+ $d1 = '';
+ $d2 = '';
+ }
+
# VACUUM stats per table
if ($autovacuum_info{count} > 0) {
print $fh qq{
$autovacuum_info{count}++;
$autovacuum_info{tables}{$1}{vacuums} += 1;
$autovacuum_info{tables}{$1}{idxscans} += $2;
+ $autovacuum_info{chronos}{$date_part}{$prefix_vars{'t_hour'}}{count}++;
}
if (
($prefix_vars{'t_loglevel'} eq 'LOG')
return if ($disable_autovacuum);
$autoanalyze_info{count}++;
$autoanalyze_info{tables}{$1}{analyzes} += 1;
+ $autoanalyze_info{chronos}{$date_part}{$prefix_vars{'t_hour'}}{count}++;
}
# Store checkpoint information