<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoPlainText>Hi !<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>I’m using busybox in my custom Linux platform and no sudo support. It’s a 64 bit machine.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><b>Trail 1:<o:p></o:p></b></p><p class=MsoPlainText><b>========<o:p></o:p></b></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>1. Start the lttng-session being <b>root user</b><o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>root@~ # lttng create<b> ksession</b><o:p></o:p></p><p class=MsoPlainText>Session ksession created.<o:p></o:p></p><p class=MsoPlainText>Traces will be written in /root/lttng-traces/ksession-20131224-122721<o:p></o:p></p><p class=MsoPlainText>root@~ #<o:p></o:p></p><p class=MsoPlainText>root@~ # lttng enable-event -k -a<o:p></o:p></p><p class=MsoPlainText>All kernel events are enabled in channel channel0<o:p></o:p></p><p class=MsoPlainText>root@~ # lttng start<o:p></o:p></p><p class=MsoPlainText>Tracing started for session ksession<o:p></o:p></p><p class=MsoPlainText>root@~ # lttng stop<o:p></o:p></p><p class=MsoPlainText>Waiting for data availability.<o:p></o:p></p><p class=MsoPlainText>Tracing stopped for session ksession<o:p></o:p></p><p class=MsoPlainText>root@~ # lttng destroy<o:p></o:p></p><p class=MsoPlainText>Session ksession destroyed<o:p></o:p></p><p class=MsoPlainText>root@~ # cd /root/<o:p></o:p></p><p class=MsoPlainText>root@~ # ls<o:p></o:p></p><p class=MsoPlainText>lttng-traces<o:p></o:p></p><p class=MsoPlainText>root@~ # cd lttng-traces/<o:p></o:p></p><p class=MsoPlainText>root@~/lttng-traces # ls<o:p></o:p></p><p class=MsoPlainText>b <b>ksession-20131224-122721</b><o:p></o:p></p><p class=MsoPlainText>root@~/lttng-traces # cd ksession-20131224-122721/<o:p></o:p></p><p class=MsoPlainText>root@~/lttng-traces/ksession-20131224-122721 # ls<o:p></o:p></p><p class=MsoPlainText>kernel<o:p></o:p></p><p class=MsoPlainText>root@~/lttng-traces/ksession-20131224-122721 # cd kernel/<o:p></o:p></p><p class=MsoPlainText>root@~/lttng-traces/ksession-20131224-122721/kernel # ls<o:p></o:p></p><p class=MsoPlainText>channel0_0 channel0_1 metadata<o:p></o:p></p><p class=MsoPlainText>root@~/lttng-traces/ksession-20131224-122721/kernel #<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><b>Works fine: The trace file is generated <o:p></o:p></b></p><p class=MsoPlainText><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoPlainText><b><span style='font-size:12.0pt'>Refer: Attached log sessionlog.txt<o:p></o:p></span></b></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><b>Trail 2:<o:p></o:p></b></p><p class=MsoPlainText><b>========<o:p></o:p></b></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>1. Start the lttng-session from root user<o:p></o:p></p><p class=MsoPlainText>2. Run the following command from "tracing" group user<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>lttng@/ # lttng -g lttng create <b>ks</b><o:p></o:p></p><p class=MsoPlainText>Session ks created.<o:p></o:p></p><p class=MsoPlainText>Traces will be written in /home/lttng/lttng-traces/ks-20131224-123537<o:p></o:p></p><p class=MsoPlainText>lttng@/ # lttng -g lttng enable-event -k -a<o:p></o:p></p><p class=MsoPlainText>All kernel events are enabled in channel channel0<o:p></o:p></p><p class=MsoPlainText>lttng@/ # lttng -g lttng start<o:p></o:p></p><p class=MsoPlainText>Tracing started for session ks<o:p></o:p></p><p class=MsoPlainText>lttng@/ # lttng -g lttng stop<o:p></o:p></p><p class=MsoPlainText>Waiting for data availability.<o:p></o:p></p><p class=MsoPlainText>Tracing stopped for session ks<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/ks-20131224-123537 # ls<o:p></o:p></p><p class=MsoPlainText>kernel<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/ks-20131224-123537 # cd kernel/<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/ks-20131224-123537/kernel # ls<o:p></o:p></p><p class=MsoPlainText>channel0_0 channel0_1 metadata<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/ks-20131224-123537/kernel #<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><b>The kernel traces are generated fine<o:p></o:p></b></p><p class=MsoPlainText>lttng@/ # lttng -g lttng create as<o:p></o:p></p><p class=MsoPlainText>Session as created.<o:p></o:p></p><p class=MsoPlainText>Traces will be written in /home/lttng/lttng-traces/as-20131224-123811<o:p></o:p></p><p class=MsoPlainText>lttng@/ # lttng -g lttng enable-event -k -u -a<o:p></o:p></p><p class=MsoPlainText>All kernel events are enabled in channel channel0<o:p></o:p></p><p class=MsoPlainText>lttng@/ # lttng -g lttng start<o:p></o:p></p><p class=MsoPlainText>Tracing started for session as<o:p></o:p></p><p class=MsoPlainText>lttng@/ # cd /tmp/<o:p></o:p></p><p class=MsoPlainText>lttng@/tmp # ./sample<o:p></o:p></p><p class=MsoPlainText>lttng@/tmp # lttng -g lttng stop<o:p></o:p></p><p class=MsoPlainText>Waiting for data availability.<o:p></o:p></p><p class=MsoPlainText>Tracing stopped for session as<o:p></o:p></p><p class=MsoPlainText>lttng@/tmp # lttng -g lttng destroy<o:p></o:p></p><p class=MsoPlainText>Session as destroyed<o:p></o:p></p><p class=MsoPlainText>remove config file: Permission denied<o:p></o:p></p><p class=MsoPlainText>lttng@/tmp #<o:p></o:p></p><p class=MsoPlainText>lttng@/tmp #<o:p></o:p></p><p class=MsoPlainText>lttng@/tmp # cd /home/lttng/lttng-traces/<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces # ls<o:p></o:p></p><p class=MsoPlainText>app-20131224-120035 as-20131224-123811 ks-20131224-123537 temp-20131224-112934<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces # cd as-20131224-123811/<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/as-20131224-123811 # ls<o:p></o:p></p><p class=MsoPlainText>kernel<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/as-20131224-123811 # cd kernel/<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/as-20131224-123811/kernel # ls<o:p></o:p></p><p class=MsoPlainText>channel0_0 channel0_1 metadata<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/as-20131224-123811/kernel #<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><b><span style='color:red'>No userspace traces are generated<o:p></o:p></span></b></p><p class=MsoPlainText><span style='color:red'><o:p> </o:p></span></p><p class=MsoPlainText><b><span style='font-size:12.0pt'>Refer: Attached log sessionlog-tr.txt <o:p></o:p></span></b></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Trail 3:<o:p></o:p></p><p class=MsoPlainText>========<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>1. Start the lttng-session from non-root user<o:p></o:p></p><p class=MsoPlainText>2. Run the following command <o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>lttng@/ # lttng -g lttng create appses<o:p></o:p></p><p class=MsoPlainText>Session appses created.<o:p></o:p></p><p class=MsoPlainText>Traces will be written in /home/lttng/lttng-traces/appses-20131224-124354<o:p></o:p></p><p class=MsoPlainText>lttng@/ # lttng -g lttng enable-event -u -a<o:p></o:p></p><p class=MsoPlainText>All UST events are enabled in channel channel0<o:p></o:p></p><p class=MsoPlainText>lttng@/ # lttng -g lttng start<o:p></o:p></p><p class=MsoPlainText>Tracing started for session appses<o:p></o:p></p><p class=MsoPlainText>lttng@/ # cd /tmp<o:p></o:p></p><p class=MsoPlainText>lttng@/tmp # ./sample<o:p></o:p></p><p class=MsoPlainText>lttng@/tmp # lttng -g lttng stop<o:p></o:p></p><p class=MsoPlainText>Waiting for data availability<o:p></o:p></p><p class=MsoPlainText>Tracing stopped for session appses<o:p></o:p></p><p class=MsoPlainText>lttng@/tmp # lttng -g lttng destroy<o:p></o:p></p><p class=MsoPlainText>Session appses destroyed<o:p></o:p></p><p class=MsoPlainText>remove config file: Permission denied<o:p></o:p></p><p class=MsoPlainText>lttng@/tmp # cd /home/lttng/lttng-traces/a<o:p></o:p></p><p class=MsoPlainText>app-20131224-120035/ appses-20131224-124354/ as-20131224-123811/<o:p></o:p></p><p class=MsoPlainText>lttng@/tmp # cd /home/lttng/lttng-traces/appses-20131224-124354/<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/appses-20131224-124354 # ls<o:p></o:p></p><p class=MsoPlainText>ust<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/appses-20131224-124354 # cd ust/<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/appses-20131224-124354/ust # ls<o:p></o:p></p><p class=MsoPlainText>uid<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/appses-20131224-124354/ust # cd uid/<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/appses-20131224-124354/ust/uid # ls<o:p></o:p></p><p class=MsoPlainText>16063<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/appses-20131224-124354/ust/uid # cd 16063/<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/appses-20131224-124354/ust/uid/16063 # ls<o:p></o:p></p><p class=MsoPlainText>64-bit<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/appses-20131224-124354/ust/uid/16063 # cd 64-bit/<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/appses-20131224-124354/ust/uid/16063/64-bit # ls<o:p></o:p></p><p class=MsoPlainText>channel0_0 channel0_1 metadata<o:p></o:p></p><p class=MsoPlainText>lttng@~/lttng-traces/appses-20131224-124354/ust/uid/16063/64-bit #<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><b>The userspace trace files are generated<o:p></o:p></b></p><p class=MsoPlainText><span style='color:red'>No kernel traces are generated<o:p></o:p></span></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><b><span style='font-size:12.0pt'>Refer: The attached log sessionlog-tracing-group.txt<o:p></o:p></span></b></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Regards,<o:p></o:p></p><p class=MsoPlainText>GMK<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>-----Original Message-----<br>From: Thibault, Daniel [mailto:Daniel.Thibault@drdc-rddc.gc.ca] <br>Sent: Saturday, December 14, 2013 2:33 AM<br>To: lttng-dev@lists.lttng.org<br>Cc: Manikandan Govindaswamy; Jérémie Galarneau<br>Subject: Re: [lttng-dev] lttng-ust works</p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>> Date: Fri, 13 Dec 2013 16:09:50 +0800<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> I tried with David's instruction and the logs are attached. Still the trace files are not generated for the easy-ust example.<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> I tried both --verboseconsumer and --consumerd64-path options for running the lttng-sessiond and the relevant logs are attached.<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> Please let me know if something is wrong that breaks creating the traces on root user.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText> 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:<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>lttng create mysession --output /home/username/lttng-traces/somedir<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Daniel U. Thibault<o:p></o:p></p><p class=MsoPlainText>Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)<o:p></o:p></p><p class=MsoPlainText>Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)<o:p></o:p></p><p class=MsoPlainText>R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)<o:p></o:p></p><p class=MsoPlainText>2459 route de la Bravoure<o:p></o:p></p><p class=MsoPlainText>Québec QC G3J 1X5<o:p></o:p></p><p class=MsoPlainText>CANADA<o:p></o:p></p><p class=MsoPlainText>Vox : (418) 844-4000 x4245<o:p></o:p></p><p class=MsoPlainText>Fax : (418) 844-4538<o:p></o:p></p><p class=MsoPlainText>NAC : 918V QSDJ <<a href="http://www.travelgis.com/map.asp?addr=918V%20QSDJ"><span style='color:windowtext;text-decoration:none'>http://www.travelgis.com/map.asp?addr=918V%20QSDJ</span></a>><o:p></o:p></p><p class=MsoPlainText>Gouvernement du Canada | Government of Canada<o:p></o:p></p><p class=MsoPlainText><<a href="http://www.valcartier.drdc-rddc.gc.ca/"><span style='color:windowtext;text-decoration:none'>http://www.valcartier.drdc-rddc.gc.ca/</span></a>><o:p></o:p></p></div></body></html>