Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] How To View Live Traces

Thanks for the reply Alexandre. I've added my user to the tracing group and am testing now. While I am testing, do you or Bernd have any idea how I would navigate to the live trace location through the Import button before it the trace is started and therefore saved to ~/lttng-traces?

On Tue, Mar 15, 2016 at 10:34 AM, Alexandre Montplaisir <alexmonthy@xxxxxxxxxxxx> wrote:
Hi Michael,

I would recommend against running Eclipse / Trace Compass as root. A large UI application with network access that runs as root, that's just asking for trouble! ;)

If you have sudo access, you should be able to create the group "tracing" and add your user to it:

$ sudo addgroup tracing
$ sudo usermod -a -G tracing yourusername
(login out then back in your session)

That way your user will have access to kernel tracing, and the only component that runs as root will be the lttng-sessiond.

I would suggest to try this next. I don't know if this will also solve your problem, but I know for sure we do not test running Trace Compass as root. Bernd, do you think it could be related?


Cheers,
Alexandre


On 2016-03-14 07:20 AM, Michael Steppe wrote:
I'm sorry Alexandre. I was using Eclipse Luna's built in linuxtools plugin
when I saw the "null argument" error. I just realized my mistake.

That said, I opened the1.2.0  Trace Compass standalone application as root
as was able to enable kernel space events for a live trace. When I click
import in the LTTng Control view, I get this message:

[image: Inline image 1]

Much better than last time! But, after I click OK it asks me to navigate to
the trace location:

[image: Inline image 2]

The issue here is that when I navigate to /root/lttng-traces/localhost, my
session name is not there (not until after the kernel trace is started and
stopped is there a folder for the trace in this location). From what I
understand, when live tracing as root from the command line, the live
traces are saved somewhere like "net://localhost/<session-name>" until the
trace is started and stopped. Babeltrace is able to listen to that location
and view the live-trace *as events roll in*. Is there a way to do this in

Trace Compass or am I just not understanding how the Import trace button
works? You cannot navigate to the "net://...." location through the Trace
Compass Import GUI.

On Thu, Mar 10, 2016 at 10:53 PM, Alexandre Montplaisir <
alexmonthy@xxxxxxxxxxxx> wrote:

On 2016-03-10 01:33 PM, Michael Steppe wrote:

I hope you are able to view the screenshots I add to these messages.

Yep, works fine here! I think the online archive will scrub them though.

   Here
is another which shows an output of loaded kernel modules (which I grep-ed
for 'ltt'):

[image: Inline image 1]

I couldn't get the 2.7.1 Kernel modules to build in CentOS 6.5, so I had
to
downgrade to 2.4.4 (which is documented to still support live tracing).

2.4 is *very* old, and not supported any more upstream. What kernel
version are you using? If LTTng 2.4 works, then LTTng 2.7 should too,
that's strange. You should report it, along with the error logs, to the
lttng-dev mailing list.

I am not even sure if Trace Compass supports live tracing on 2.4. I think
the protocol changed at some point and it's possible we only support later
versions. Bernd could confirm this.

   I
also downgraded my lttng-tools and lttng-ust to 2.4.4 to stay in line with
the kernel version. I am still unable to Import/view any live traces as
they are running. I even attempted to download a fresh version of Eclipse
Luna CDT which has linuxtools installed already. Even that control view
does not allow me to select the kernel domain.

Are you able to take kernel traces on that machine?

As Bernd mentioned, you need special rights to trace the kernel. A very
easy way to test if you have access to kernel tracing is the command "lttng
list -k". If it prints the list of kernel events, you are good to go.
However it should print an error if you don't have the requirements (user
not in the "tracing" group, modules not installed, etc.)

Simply seeing the modules in lsmod doesn't necessarily means your user can
trace the kernel.

If you get an error running "lttng list -k", then it's LTTng that is not
configured correctly, and Trace Compass only shows the available options.
But if the command works, then there might be a bug on the Trace Compass
side. Normally these options are greyed out when the user doesn't have
access to kernel tracing.


   Trying to test the UST
domain as you said would still work, I enabled all UST events and clicked
Import and got a "null argument" error. There was no other details
provided
about the error.

That is also strange, but could be due to using LTTng 2.4.

   Is there any way I could get a screenshot by screenshot
view of how you are importing live traces? Are you creating sessions AND
channels and then enabling events or just creating sessions and enabling
events?

Thanks for all your help by the way. I'm sure it is frustrating trying to
explain something that you know works. I just haven't had any luck the
past
few weeks trying to view live traces graphically (works with babeltrace
but
not very "human readable").

No problem, what is frustrating is that it doesn't work for a user, so we
want to help make it work! :)


Cheers,
Alexandre




Back to the top