archive mirror
 help / color / mirror / Atom feed
From: Lin Wang <>
Subject: how to continuously capture events
Date: Wed, 5 May 2021 08:21:35 -0400	[thread overview]
Message-ID: <> (raw)

Hi all,

I'm new to ftrace and linux programming in general. Forgive me for
asking dumb questions.

I'm trying to continuously capture certain kernel events, convert them
to a different format and then write them to a file.

I understand that trace_pipe should be used for streaming. But I'm not
sure how to read the content of trace_pipe at event boundary (I
currently just read it to a temp buffer which would sometimes cut the
last event in half). I discovered libtraceevent and libtracefs that I
think are meant to help with this kind of tasks, so I'm reading the
source code of trace-cmd to find examples. But so far the progress has
been slow.

Could anyone point me to the right direction, or advise me with a
general outline of what I should do to achieve my task?


             reply	other threads:[~2021-05-05 12:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05 12:21 Lin Wang [this message]
2021-05-05 13:18 ` how to continuously capture events Steven Rostedt
2021-05-05 14:48   ` Lin Wang
2021-05-05 13:47 ` Jonathan Rajotte-Julien
2021-05-05 14:50   ` Lin Wang

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \

* 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).