All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milian Wolff <milian.wolff@kdab.com>
To: lttng-dev@lists.lttng.org
Subject: Resetting an lttng session
Date: Wed, 26 Apr 2017 14:01:02 +0200	[thread overview]
Message-ID: <2458437.IRf00LH1gP__20964.9699427702$1493208459$gmane$org@milian-kdab2> (raw)

Hey all,

I'm playing around with lttng-ust (latest git build from modules, tools, ust 
against a 4.10.11 kernel on arch linux) and noticed the following:

~~~~~~~~~~~~~~~~~~~~~~~
$ lttng create
$ lttng enable-channel my_channel -u
$ lttng enable-event -c my_channel -u -a
$ lttng start
# launch something that traces with UST
$ lttng stop
~~~~~~~~~~~~~~~~~~~~~~~

Now I want to rerun my application after changing it, and reinspect the files. 
If I only do lttng start/stop again, the data will be appended to the previous 
ones. How can I "reset" the status? I know there's lttng destroy, but that 
would mean I'd have to rerun the enable-* commands, which is cumbersome.

Also, I notice that I can easily get lttng into a non-obvious fail state by 
doing the following after an initial record as specified above:

~~~~~~~~~~~~~~~~~~~~~~~
$ rm -Rf /root/lttng-traces/auto-20170426-135035 # cf. lttng list
$ lttng status (still looks good)
$ lttng start
# launch something that traces with UST
$ lttng stop
$ lttng view
Trace directory: /root/lttng-traces/auto-20170426-135035

[error] Cannot open any trace for reading.

[error] opening trace "/root/lttng-traces/auto-20170426-135035" for reading.

[error] none of the specified trace paths could be opened.
~~~~~~~~~~~~~~~~~~~~~~~

Indeed, when I look into the folder it exists but is empty. I initially 
expected that LTTng would recreate the folder and internal data as-needed. 
Apparently that is not the case and I have to destroy the session and start 
from scratch. Note also that there are no errors shown anywhere, which left me 
guess as to what is going on here.

If this situation would be handled more gracefully, I could use the "rm" 
command to "reset" the session in-between start/stop cycles.

Thank you

-- 
Milian Wolff | milian.wolff@kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

                 reply	other threads:[~2017-04-26 12:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='2458437.IRf00LH1gP__20964.9699427702$1493208459$gmane$org@milian-kdab2' \
    --to=milian.wolff@kdab.com \
    --cc=lttng-dev@lists.lttng.org \
    /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.