Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] Having trouble with LTTng folders
@ 2013-11-19 13:38 Michael Steppe
  2014-02-03 15:56 ` Mathieu Desnoyers
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Steppe @ 2013-11-19 13:38 UTC (permalink / raw)


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/7c954297/attachment-0001.html>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [lttng-dev] Having trouble with LTTng folders
  2013-11-19 13:38 [lttng-dev] Having trouble with LTTng folders Michael Steppe
@ 2014-02-03 15:56 ` Mathieu Desnoyers
  0 siblings, 0 replies; 4+ messages in thread
From: Mathieu Desnoyers @ 2014-02-03 15:56 UTC (permalink / raw)


----- Original Message -----

> From: "Michael Steppe" <msteppe91@gmail.com>
> To: lttng-dev at lists.lttng.org
> Sent: Tuesday, November 19, 2013 8:38:53 AM
> Subject: [lttng-dev] Having trouble with LTTng folders

> 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!

I don't think this old version (2.0.4) allowed that. You will probably need to play with your HOME env. var. 
to put the .lttngrc file elsewhere. We introduced LTTNG_HOME env. var. later, but I don't think it was 
present in 2.0.4. 

Thanks, 

Mathieu 

> Thanks!
> Michael Steppe

> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers 
EfficiOS Inc. 
http://www.efficios.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20140203/83b51d06/attachment-0001.html>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [lttng-dev] Having Trouble with LTTng folders
@ 2013-11-19 16:48 Thibault, Daniel
  0 siblings, 0 replies; 4+ messages in thread
From: Thibault, Daniel @ 2013-11-19 16:48 UTC (permalink / raw)


Date: Tue, 19 Nov 2013 08:43:17 -0500
From: Michael Steppe <msteppe91@gmail.com>

> 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 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 think you need to change your $HOME when issuing the lttng command.  If 'Scott' has sudo privileges, you could prefix your lttng commands with 'sudo -H ' and that would do the trick.  Otherwise, just prefix the lttng command with 'HOME=/root '.  This must be done with all lttng commands, because the client looks .lttngrc up every time (unless you use the --session option common to nearly all commands).

Daniel U. Thibault
Protection des syst?mes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
Cyber s?curit? pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
R & D pour la d?fense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)
2459 route de la Bravoure
Qu?bec QC  G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada | Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [lttng-dev] Having Trouble with LTTng folders
@ 2013-11-19 13:43 Michael Steppe
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Steppe @ 2013-11-19 13:43 UTC (permalink / raw)


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>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-03 15:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-19 13:38 [lttng-dev] Having trouble with LTTng folders Michael Steppe
2014-02-03 15:56 ` Mathieu Desnoyers
2013-11-19 13:43 [lttng-dev] Having Trouble " Michael Steppe
2013-11-19 16:48 Thibault, Daniel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox