Skip to contentSkip to conversation

perf stat to collect the performance statistics of KVM process

DISCUSSION Hailong Yang 2 participants 2 messages May 13, 2012 – May 14, 2012 KVM

lore
Share & tools
lore
#0 lore raw

Dear all,

I am running perf stat to collect the performance statistics of the already running KVM guest VM 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. What I would like to do is that to collect performance counters of the guest VM process for a certain period and redirect the output to a log file, but without user interaction (such as using CTRL + C to stop the perf stat)

[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

#1 lore raw
Quoted 18 lines · Hailong Yang

Dear all,

I am running perf stat to collect the performance statistics of the already running KVM guest VM 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. What I would like to do is that to collect performance counters of the guest VM process for a certain period and redirect the output to a log file, but without user interaction (such as using CTRL + C to stop the perf stat)

[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 ~]#

Quoted 1 line

Any clue?

Can you please try "kill -s INT <pid>"

Quoted 5 lines

Best Regards

Hailong

-Andrew Theurer