<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;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
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;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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-CA" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D">Hi Anette,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D">We are using the following for a live streaming:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> export TC=MySession<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> <o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> #-- see if there is any instrumented application is running
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> lttng list –u <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> ps -ef |egrep 'lttng'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> #-- Launch relayd with ControlPort 53000, DataPort 53001 and LiveViewPort 53002<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> # whatever relayd collects, will be stored in /tmp/$TC<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> lttng-relayd -C tcp://localhost:53000 -D tcp://localhost:53001 -L net://localhost:53002 -o /tmp/$TC &<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D">
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> #-- Create session using Control and Data ports as specified in relayd<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> lttng create $TC --live 1000000 -U net://localhost:53000:53001/./<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> <o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> lttng list<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> #-- We want to use per-Uid buffer instead of the default per-PID buffer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> lttng enable-channel chan1 -u --buffers-uid
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> lttng enable-event -s $TC -u -c chan1 tracepoints_that_you_want_to_trace_on<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> lttng start $TC;
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> lttng list $TC<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> #-- make sure you see the tracepoints that your session is tracing on from the<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> # output of the next command, otherwise, your session / live view will not<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> # be able to capture anything<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> lttng list –u<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> #----- live viewing: -----<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> # to get a list of viewable traces (note the live view port is used here)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> babeltrace -i lttng-live net://localhost:53002
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> net://localhost:53002/host/SC-1/MySession (timer = 1000000, 17 stream(s), 0 client(s) connected)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> # Start the live view on node SC-1
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> babeltrace -i lttng-live net://localhost:53002/host/SC-1/$TC
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> <you should see your trace hit now><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> #-- stop the session<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> lttng stop $TC<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> lttng destroy $TC<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> #-- Convert what your session has captured:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"> babeltrace /tmp/$TC<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D">Hope it helps,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D">Tan<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Anette Schött [mailto:anette.schott@ericsson.com]
<br>
<b>Sent:</b> February-19-14 8:55 AM<br>
<b>To:</b> lttng-dev@lists.lttng.org<br>
<b>Subject:</b> [lttng-dev] Live streaming question (lttng 2.4.0.rc4)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I am trying to do live streaming via the lttng-relayd and babeltrace (lttng 2.4.0.rc4). I am running an emulator where<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I want to both generate the user-space tracepoints and view them live on the same host (hope this is a valid use case).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I do the following:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"># lttng-relayd -d -v -L net://localhost:5344<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">DEBUG3 [1516/1516]: URI string: net://localhost:5344 (in uri_parse() at uri.c:291)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">DEBUG3 [1516/1516]: URI dtype: 1, proto: 1, host: localhost, subdir: , ctrl: 5344, data: 0 (in uri_parse() at uri.c:505)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">DEBUG3 [1516/1516]: URI string: tcp://0.0.0.0:5342 (in uri_parse() at uri.c:291)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">DEBUG3 [1516/1516]: URI dtype: 1, proto: 1, host: 0.0.0.0, subdir: , ctrl: 5342, data: 0 (in uri_parse() at uri.c:505)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">DEBUG3 [1516/1516]: URI string: tcp://0.0.0.0:5343 (in uri_parse() at uri.c:291)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">DEBUG3 [1516/1516]: URI dtype: 1, proto: 1, host: 0.0.0.0, subdir: , ctrl: 5343, data: 0 (in uri_parse() at uri.c:505)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">DEBUG1 [1516/1516]: Signal handler set for SIGTERM, SIGUSR1, SIGPIPE and SIGINT (in set_signal_handler() at main.c:435)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"># lttng create s1 --live 200000 -U net://localhost:5344<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Session s1 created.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Traces will be written in net://localhost:5344<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"># lttng enable-channel ch1 –u<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ERROR [834/838]: recvmsg inet: Connection reset by peer (in lttcomm_recvmsg_inet_sock() at inet.c:376)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Error: Channel ch1: Relay daemon not compatible (session s1)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Warning: Some command(s) went wrong<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">As all command are executed on the same host, why compatibility issues?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">What commands shall I use to set up a live streaming?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Anette<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>