perf stat: how to capture the output when it is running in the backgroud
Dear all,
I am running perf stat to collect the performance statistics of a already running process. And I have a shell script to execute the perf stat as a daemon process. But when I use the 'kill' command to stop the perf stat, there is no output redirected to a file.
[root@dell06 ~]# (perf stat -p 7473 -x ,) 2> perftest &
[1] 15086
[root@dell06 ~]# kill 15086
[root@dell06 ~]#
[1]+ Terminated ( perf stat -p 7473 -x , ) 2> perftest
[root@dell06 ~]# cat perftest
[root@dell06 ~]#
Any clue?
Best Regards
Hailong
Quoted 7 lines · Hailong Yang
Dear all,
I am running perf stat to collect the performance statistics of a already running process. And I have a shell script to execute the perf stat as a daemon process. But when I use the 'kill' command to stop the perf stat, there is no output redirected to a file.
Quoted 7 lines
[root@dell06 ~]# (perf stat -p 7473 -x ,) 2> perftest&
[1] 15086
[root@dell06 ~]# kill 15086
[root@dell06 ~]#
[1]+ Terminated ( perf stat -p 7473 -x , ) 2> perftest
[root@dell06 ~]# cat perftest
[root@dell06 ~]#
Try: kill -INT $pid
David
Thanks, David. That works.
Hailong
Quoted 6 lines
-----Original Message-----
From: David Ahern [mailto:[email protected]]
Sent: Monday, May 14, 2012 3:08 AM
To: Hailong Yang
Cc: [email protected]
Subject: Re: perf stat: how to capture the output when it is running in
the
Quoted 6 lines
backgroud
Quoted 3 lines · Hailong Yang
Dear all,
I am running perf stat to collect the performance statistics of a
already
Quoted 15 lines
Quoted 11 lines
running process. And I have a shell script to execute the perf stat as a daemon process. But when I use the 'kill' command to stop the perf stat, there is no output redirected to a file.
[root@dell06 ~]# (perf stat -p 7473 -x ,) 2> perftest&
[1] 15086
[root@dell06 ~]# kill 15086
[root@dell06 ~]#
[1]+ Terminated ( perf stat -p 7473 -x , ) 2> perftest
[root@dell06 ~]# cat perftest
[root@dell06 ~]#Try: kill -INT $pid
David