[lttng-dev] Having Trouble with LTTng folders

Michael Steppe msteppe91 at gmail.com
Tue Nov 19 08:43:17 EST 2013


Hello!

I am currently running lttng-tools 2.0.4 on CentOS 6.3 (unfortunately I
cannot upgrade either at this time).

I have created a plugin in Eclipse (called LTTng Control) that allows users
to trace without the command line. It is just a simple GUI with buttons
that essentially relate to the system calls in the terminal. One of the
options I have allows users to manually connect, via the IP address, to
another VM to trace remotely on that VM. So far I support RHEL 6.1, 6.3,
6.4, and CentOS 6.3 remote VMs. I have made all the system calls as seen
below, creating each trace in /tmp and calling all lttng calls on that
specific trace:

lttng create TRACE_<date>_<time> -o /tmp/TRACE_<date>_<time>
lttng enable-event -a -k TRACE_<date>_<time>
lttng start TRACE_<date>_<time>
lttng stop TRACE_<date>_<time>
lttng destroy TRACE_<date>_<time>

I then change ownership of each trace folder (and all subfolders) after the
destroy command so that the user who signed in when connecting to the
remote VM now has ownership of the trace and can view and open the trace
files in the LTTng Eclipse Viewer plugin.

This ALL works PERFECTLY on a remote VM where I had the root account
"adduser user". Unfortunately, I need to set up users a little differently
for work...

I have set up another VM that only has a root account. Using Active
Directory, I set up user accounts from my work's development network
(giving everyone here at work the ability to sign in with their usernames
and passwords), meaning root does not have permissions to edit files owned
by these users. Here lies my problem:

Let's say I sign in to the remote VM as user = "Scott". When I try and
attempt to perform the "create" command through my plugin, I get:

An error was encountered on 10.176.15.180 (10.176.15.180)
Host: 10.176.15.180
Command: /usr/bin/lttng create TRACE_111913_082211 -o
/tmp/TRACE_111913_082211
Exit Code: 1
No output stream captured
Error Output:
    Error: Unable to create config file
    Error: Command error

I am assuming it is unable to create the config file because the all the
tracing folders and files are created and owned by root and root does not
have access to write to Scott's home directory, where the config file
should go. The trace is actually created, but not .lttngrc file is created.
If I perform an 'lttng list" in the remote VM (signed in as Scott), I can
see the TRACE_<date>_<time> and that its status is [inactive] (because we
haven't started the trace yet).

My question is this. Is there a way, in this version of LTT, to have the
.lttng and .lttngrc folder/file to be located somewhere else? That way, all
the tracing is done by root and the trace files are stored in /tmp and when
the tracing is finished, root can give Scott ownership of the trace files?

I know that was long and possibly confusing so let me know if you have any
questions. Love your tracing tool by the way!

Thanks!
Michael Steppe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20131119/388c6802/attachment.html>


More information about the lttng-dev mailing list