All of lore.kernel.org
 help / color / mirror / Atom feed
* Resetting an lttng session
@ 2017-04-26 12:01 Milian Wolff
  0 siblings, 0 replies; only message in thread
From: Milian Wolff @ 2017-04-26 12:01 UTC (permalink / raw)
  To: lttng-dev

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-26 12:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-26 12:01 Resetting an lttng session Milian Wolff

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.