mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-03-05 01:13:28 +08:00
PT-2037 Option --system-only for pt-stalk
Option --system-only triggers only operating system related captures, ignoring all others.
This commit is contained in:
@@ -556,6 +556,30 @@ is(
|
||||
"Retention test 5: retention by count works as expected"
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
# Test if option --system-only works correctly
|
||||
# ###########################################################################
|
||||
|
||||
cleanup();
|
||||
|
||||
$retval = system("$trunk/bin/pt-stalk --no-stalk --system-only --run-time 10 --sleep 2 --dest $dest --pid $pid_file --iterations 1 -- --defaults-file=$cnf >$log_file 2>&1");
|
||||
|
||||
PerconaTest::wait_until(sub { !-f $pid_file });
|
||||
|
||||
$output = `ls $dest`;
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/(df)|(ps)/,
|
||||
"Option --system-only collects system data"
|
||||
);
|
||||
|
||||
unlike(
|
||||
$output,
|
||||
qr/(innodbstatus)|(mysqladmin)/,
|
||||
"Option --system-only does not collect MySQL data"
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
# Test report about performance schema transactions in MySQL 5.7+
|
||||
# ###########################################################################
|
||||
|
||||
Reference in New Issue
Block a user