From: Keith Owens Date: Mon, 18 Jan 2016 02:15:36 +0000 (+1100) Subject: strace-graph: print the pid in the graph X-Git-Tag: v4.12~591 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=320fb41682b2109e433b27393739c28bf40ef2fb;p=strace strace-graph: print the pid in the graph * strace-graph: Prefix each command with its pid. --- diff --git a/strace-graph b/strace-graph index 680eb5f1..5435e864 100755 --- a/strace-graph +++ b/strace-graph @@ -314,10 +314,10 @@ sub display_pid_trace { if ($$elem[0] eq 'EXEC') { my $argv = $$elem[2]; if (defined $elapsed) { - print "$lead [$elapsed] @$argv\n"; + print "$lead [$elapsed] $pid @$argv\n"; undef $elapsed; } else { - print "$lead @$argv\n"; + print "$lead $pid @$argv\n"; } } elsif ($$elem[0] eq 'FORK') { if ($i == 1) {