Hi David,

What I want to do is as this: Unlike using perf record to write
samples to a perf.data,  I want to just read each 100 samples and do
some statistics on them and write down the statistical data rather
than the raw sampling information.

The Man page of Perf script says that :

           'perf script <script> <required-script-args> <command>' to
both  record the events required for <script> and to run the <script>
   using 'live-mode' i.e. without writing anything to disk.

Not writing things down to disk is what I want, because when too many
samples will pose great impact on disks. That's what I try to avoid.



Best wishes.
Yours,
Wang Peipei


On Thu, Aug 15, 2013 at 12:58 PM, David Ahern <dsah...@gmail.com> wrote:
> On 8/14/13 3:19 PM, Peipei Wang wrote:
>>
>> Hi all,
>>
>> I want to use perf script to process the data sampled by "perf record"
>> since it is huge overhead to just write down all the samples.
>> Processing the samples every minute is what I am desperate to do.
>
>
> I don't follow what you are trying to do. perf-script can pretty print each
> sample -- time, cpu, task, pid/tid, etc (that option of perf-script is
> really a misnomer and this should be a perf-dump command).
>
> From there you want to process the samples?
>
> If you know perl or python take a look at the scripts in
> tools/perf/scripts/python. I have not written external scripts, so can't
> offer any suggestions for you.
>
> David
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to