From: David Ahern <dsahern@gmail.com>
To: Peipei Wang <wangpeipei.90@gmail.com>
Cc: perf group <linux-perf-users@vger.kernel.org>
Subject: Re: How to get perf stat output and redirect to a file rather than screen
Date: Thu, 27 Jun 2013 11:49:42 -0600 [thread overview]
Message-ID: <51CC7B36.6030201@gmail.com> (raw)
In-Reply-To: <CAEuYUeqBE57QnF1rqk9G5tM58pXFVvpNP2GE4mQcvE0cLBgncA@mail.gmail.com>
On 6/27/13 11:47 AM, Peipei Wang wrote:
> Hi all.
>
> I want to save the output of perf stat as a file, however, I 've tried
> several ways, none of them works. Here is what I have tried.
> My basic command is " timeout -s SIGINT 4s perf stat -p 32098". That
> is using perf stat to capture process 32098 for 4 seconds.
perf stat -o <stat-output-file> -p 32098
Also, instead of timeout ... you can run:
perf sat -o /tmp/perfstat.out -p 32098 -- sleep 4
That tells perf to profile process 32098 and do so for as long as the
workload is running where the workload is to sleep for 4 seconds.
David
prev parent reply other threads:[~2013-06-27 17:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 17:47 How to get perf stat output and redirect to a file rather than screen Peipei Wang
2013-06-27 17:49 ` David Ahern [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51CC7B36.6030201@gmail.com \
--to=dsahern@gmail.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=wangpeipei.90@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.