All of lore.kernel.org
 help / color / mirror / Atom feed
* perf stat: how to capture the output when it is running in the backgroud
@ 2012-05-13 15:47 Hailong Yang
  2012-05-13 19:08 ` David Ahern
  0 siblings, 1 reply; 3+ messages in thread
From: Hailong Yang @ 2012-05-13 15:47 UTC (permalink / raw)
  To: linux-perf-users

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: perf stat: how to capture the output when it is running in the backgroud
  2012-05-13 15:47 perf stat: how to capture the output when it is running in the backgroud Hailong Yang
@ 2012-05-13 19:08 ` David Ahern
  2012-05-14  2:19   ` Hailong Yang
  0 siblings, 1 reply; 3+ messages in thread
From: David Ahern @ 2012-05-13 19:08 UTC (permalink / raw)
  To: Hailong Yang; +Cc: linux-perf-users

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: perf stat: how to capture the output when it is running in the backgroud
  2012-05-13 19:08 ` David Ahern
@ 2012-05-14  2:19   ` Hailong Yang
  0 siblings, 0 replies; 3+ messages in thread
From: Hailong Yang @ 2012-05-14  2:19 UTC (permalink / raw)
  To: 'David Ahern'; +Cc: linux-perf-users

Thanks, David. That works.

Hailong

> -----Original Message-----
> From: David Ahern [mailto:dsahern@gmail.com]
> Sent: Monday, May 14, 2012 3:08 AM
> To: Hailong Yang
> Cc: linux-perf-users@vger.kernel.org
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-14  2:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-13 15:47 perf stat: how to capture the output when it is running in the backgroud Hailong Yang
2012-05-13 19:08 ` David Ahern
2012-05-14  2:19   ` Hailong Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.