summaryrefslogtreecommitdiffstats
path: root/storage/src/tests/pstack_testrunner
blob: 320d47f7e355e7a76ce22f3f9387f797e7aff650 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl -w

use strict;

my @pids = `ps auxww | grep "./testrunner" | grep -v grep`;
foreach (@pids) {
    s/^\S+\s+(\d+)\s+.*$/$1/;
    chomp;
}

foreach my $pid (@pids) {
    my $cmd = "pstack $pid";
    system($cmd) == 0 or die "Failed to run '$cmd'";
}