[lttng-dev] Resetting an lttng session
Milian Wolff
milian.wolff at kdab.com
Wed Apr 26 12:01:02 UTC 2017
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 at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
More information about the lttng-dev
mailing list