mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-24 02:01:42 +08:00
Log collector PID.
This commit is contained in:
@@ -1091,6 +1091,7 @@ stalk() {
|
||||
(
|
||||
collect "$OPT_DEST" "$prefix"
|
||||
) >> "$OPT_DEST/$prefix-output" 2>&1 &
|
||||
log "Collector PID $!"
|
||||
else
|
||||
# There will not be enough disk space, so do not collect.
|
||||
warn "Collect canceled because there will not be enough disk space after collecting another $margin MB"
|
||||
|
||||
@@ -24,7 +24,7 @@ if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox master';
|
||||
}
|
||||
else {
|
||||
plan tests => 20;
|
||||
plan tests => 21;
|
||||
}
|
||||
|
||||
my $cnf = "/tmp/12345/my.sandbox.cnf";
|
||||
@@ -169,6 +169,13 @@ like(
|
||||
"Trigger file logs how pt-stalk was ran"
|
||||
);
|
||||
|
||||
chomp($output = `cat $log_file | grep 'Collector PID'`);
|
||||
like(
|
||||
$output,
|
||||
qr/Collector PID \d+/,
|
||||
"Collector PID logged"
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
# Triggered but --no-collect.
|
||||
# ###########################################################################
|
||||
|
||||
Reference in New Issue
Block a user