[lttng-dev] lttng create --output problem

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Tue Apr 3 18:10:05 EDT 2012


* Ettore Del Negro (ettore at ettoredelnegro.me) wrote:
> On 3/4/2012 11:22 PM, David Goulet wrote:
> > Actually it does. If you type: lttng create test -o /tmp/test
> >
> > /tmp/test is created and empty.
> >
> Yeah, that was meant as a reply for Ryan.
> >
> > > Anyway, i just noticed a problem with relative paths:
> > > (~)> lttng
> > > LTTng Trace Control 2.0.0-rc2
> > > (~)> lttng create --output traces session
> > > Error: Create directory failed
> > > (~)> lttng create --output ./traces session
> > > Error: Create directory failed
> > > (~)> lttng create --output /root/traces session
> > > Session session created.
> > > Traces will be written in /root/traces
> >
> > I've just tested it. The trace output directory, given without a full
> > path, is
> > created at the $PWD of the session daemon. If the directory exist, it will
> > simply write the trace in it.
> >
> > So, the error you have are probably related to a location you don't
> > have write
> > access.....
> >
> > I agree that the relative path could be handle better and use the current
> > directory of the user using "lttng".
> I was missing the fact that the *daemon* creates the directory. Thanks
> for clarify it.

Yes. The lttng-sessiond creates the directories and files under the
credentials of the user that sent the commands. The creds are sent
through unix sockets, and see runas.c to understand how we ensure that
permissions are limited to those of the user from which the command
originated.

> Definitely use the current directory of lttng for relative paths would
> be better.

Yes, applying realpath(3) in liblttngctl will fix that.

Thanks for reporting it,

Mathieu

> >
> > Thanks!
> > David
> >
> >
> Thanks,
> Ettore
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list