Log collector PID.

This commit is contained in:
Daniel Nichter
2012-01-30 10:05:35 -07:00
parent ae558c6442
commit caa91f39fa
2 changed files with 9 additions and 1 deletions

View File

@@ -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"

View File

@@ -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.
# ###########################################################################