Thanks, David. That works.

Hailong

> -----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
> backgroud
> 
> On 5/13/12 9:47 AM, Hailong Yang wrote:
> > 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 ~]#
> 
> Try: kill -INT $pid
> 
> David

--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to