[lttng-dev] lttng-ust works

Manikandan Govindaswamy magov at vestas.com
Tue Dec 24 06:46:13 EST 2013


Hi !



I tried different possibility to generate the userspace trace and kernel trace and observed that I'm not able to generate the user space tracing If the lttng-sessiond is started using root user.



I'm using busybox in my custom Linux platform and no sudo support. It's a 64 bit machine.



Trail 1:

========



1. Start the lttng-session being root user



root@~ # lttng create ksession

Session ksession created.

Traces will be written in /root/lttng-traces/ksession-20131224-122721

root@~ #

root@~ # lttng enable-event -k -a

All kernel events are enabled in channel channel0

root@~ # lttng start

Tracing started for session ksession

root@~ # lttng stop

Waiting for data availability.

Tracing stopped for session ksession

root@~ # lttng destroy

Session ksession destroyed

root@~ # cd /root/

root@~ # ls

lttng-traces

root@~ # cd lttng-traces/

root@~/lttng-traces # ls

b                         ksession-20131224-122721

root@~/lttng-traces # cd ksession-20131224-122721/

root@~/lttng-traces/ksession-20131224-122721 # ls

kernel

root@~/lttng-traces/ksession-20131224-122721 # cd kernel/

root@~/lttng-traces/ksession-20131224-122721/kernel # ls

channel0_0  channel0_1  metadata

root@~/lttng-traces/ksession-20131224-122721/kernel #



Works fine: The trace file is generated



Refer: Attached log sessionlog.txt



Trail 2:

========



1. Start the lttng-session from root user

2. Run the following command from "tracing" group user



lttng@/ # lttng -g lttng create ks

Session ks created.

Traces will be written in /home/lttng/lttng-traces/ks-20131224-123537

lttng@/ # lttng -g lttng enable-event -k -a

All kernel events are enabled in channel channel0

lttng@/ # lttng -g lttng start

Tracing started for session ks

lttng@/ # lttng -g lttng stop

Waiting for data availability.

Tracing stopped for session ks

lttng@~/lttng-traces/ks-20131224-123537 # ls

kernel

lttng@~/lttng-traces/ks-20131224-123537 # cd kernel/

lttng@~/lttng-traces/ks-20131224-123537/kernel # ls

channel0_0  channel0_1  metadata

lttng@~/lttng-traces/ks-20131224-123537/kernel #



The kernel traces are generated fine

lttng@/ # lttng -g lttng create as

Session as created.

Traces will be written in /home/lttng/lttng-traces/as-20131224-123811

lttng@/ # lttng -g lttng enable-event -k -u -a

All kernel events are enabled in channel channel0

lttng@/ # lttng -g lttng start

Tracing started for session as

lttng@/ # cd /tmp/

lttng@/tmp # ./sample

lttng@/tmp # lttng -g lttng stop

Waiting for data availability.

Tracing stopped for session as

lttng@/tmp # lttng -g lttng destroy

Session as destroyed

remove config file: Permission denied

lttng@/tmp #

lttng@/tmp #

lttng@/tmp # cd /home/lttng/lttng-traces/

lttng@~/lttng-traces # ls

app-20131224-120035   as-20131224-123811    ks-20131224-123537    temp-20131224-112934

lttng@~/lttng-traces # cd as-20131224-123811/

lttng@~/lttng-traces/as-20131224-123811 # ls

kernel

lttng@~/lttng-traces/as-20131224-123811 # cd kernel/

lttng@~/lttng-traces/as-20131224-123811/kernel # ls

channel0_0  channel0_1  metadata

lttng@~/lttng-traces/as-20131224-123811/kernel #



No userspace traces are generated



Refer: Attached log sessionlog-tr.txt



Trail 3:

========



1. Start the lttng-session from non-root user

2. Run the following command



lttng@/ # lttng -g lttng create appses

Session appses created.

Traces will be written in /home/lttng/lttng-traces/appses-20131224-124354

lttng@/ # lttng -g lttng enable-event -u -a

All UST events are enabled in channel channel0

lttng@/ # lttng -g lttng start

Tracing started for session appses

lttng@/ # cd /tmp

lttng@/tmp # ./sample

lttng@/tmp # lttng -g lttng stop

Waiting for data availability

Tracing stopped for session appses

lttng@/tmp # lttng -g lttng destroy

Session appses destroyed

remove config file: Permission denied

lttng@/tmp # cd /home/lttng/lttng-traces/a

app-20131224-120035/     appses-20131224-124354/  as-20131224-123811/

lttng@/tmp # cd /home/lttng/lttng-traces/appses-20131224-124354/

lttng@~/lttng-traces/appses-20131224-124354 # ls

ust

lttng@~/lttng-traces/appses-20131224-124354 # cd ust/

lttng@~/lttng-traces/appses-20131224-124354/ust # ls

uid

lttng@~/lttng-traces/appses-20131224-124354/ust # cd uid/

lttng@~/lttng-traces/appses-20131224-124354/ust/uid # ls

16063

lttng@~/lttng-traces/appses-20131224-124354/ust/uid # cd 16063/

lttng@~/lttng-traces/appses-20131224-124354/ust/uid/16063 # ls

64-bit

lttng@~/lttng-traces/appses-20131224-124354/ust/uid/16063 # cd 64-bit/

lttng@~/lttng-traces/appses-20131224-124354/ust/uid/16063/64-bit # ls

channel0_0  channel0_1  metadata

lttng@~/lttng-traces/appses-20131224-124354/ust/uid/16063/64-bit #



The userspace trace files are generated

No kernel traces are generated



Refer: The attached log sessionlog-tracing-group.txt





Regards,

GMK



-----Original Message-----
From: Thibault, Daniel [mailto:Daniel.Thibault at drdc-rddc.gc.ca]
Sent: Saturday, December 14, 2013 2:33 AM
To: lttng-dev at lists.lttng.org
Cc: Manikandan Govindaswamy; Jérémie Galarneau
Subject: Re: [lttng-dev] lttng-ust works



> Date: Fri, 13 Dec 2013 16:09:50 +0800

>

> I tried with David's instruction and the logs are attached. Still the trace files are not generated for the easy-ust example.

>

> I tried both --verboseconsumer and --consumerd64-path options for running the lttng-sessiond and the relevant logs are attached.

>

> Please let me know if something is wrong that breaks creating the traces on root user.



   I've got a nasty suspicion...Try generating a trace with both kernel and user-space events (using the easy-ust sample app to generate the latter), but create it with an output option such as:



lttng create mysession --output /home/username/lttng-traces/somedir



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/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20131224/f4ace224/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sessionlog-tr.txt
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20131224/f4ace224/attachment-0003.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sessionlog-tracing-group.txt
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20131224/f4ace224/attachment-0004.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sessionlog.txt
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20131224/f4ace224/attachment-0005.txt>


More information about the lttng-dev mailing list