[lttng-dev] Live streaming question (lttng 2.4.0.rc4)

Tan Dung Le Tran tan.dung.le.tran at ericsson.com
Wed Feb 19 10:55:02 EST 2014


Hi Anette,

We are using the following for a live streaming:

   export TC=MySession

   #-- see if there is any instrumented application is running
   lttng list -u
   ps -ef |egrep 'lttng'

   #-- Launch relayd with ControlPort 53000, DataPort 53001 and LiveViewPort 53002
   #   whatever relayd collects, will be stored in /tmp/$TC
   lttng-relayd  -C tcp://localhost:53000 -D tcp://localhost:53001 -L net://localhost:53002 -o /tmp/$TC &

   #-- Create session using Control and Data ports as specified in relayd
   lttng create $TC --live 1000000 -U net://localhost:53000:53001/./

   lttng list

   #-- We want to use per-Uid buffer instead of the default per-PID buffer
   lttng enable-channel chan1 -u --buffers-uid

   lttng enable-event -s $TC -u -c chan1 tracepoints_that_you_want_to_trace_on
   lttng start $TC;
   lttng list $TC

   #-- make sure you see the tracepoints that your session is tracing on from the
   #   output of the next command, otherwise, your session / live view will not
   #   be able to capture anything
   lttng list -u

   #----- live viewing: -----

     # to get a list of viewable traces (note the live view port is used here)
     babeltrace -i lttng-live  net://localhost:53002
          net://localhost:53002/host/SC-1/MySession (timer = 1000000, 17 stream(s), 0 client(s) connected)

     # Start the live view on node SC-1
     babeltrace -i lttng-live  net://localhost:53002/host/SC-1/$TC
         <you should see your trace hit now>

   #-- stop the session
   lttng stop $TC
   lttng destroy $TC

   #-- Convert what your session has captured:
   babeltrace /tmp/$TC

Hope it helps,
Tan


From: Anette Schött [mailto:anette.schott at ericsson.com]
Sent: February-19-14 8:55 AM
To: lttng-dev at lists.lttng.org
Subject: [lttng-dev] Live streaming question (lttng 2.4.0.rc4)

Hi,

I am trying to do live streaming via the lttng-relayd and babeltrace (lttng 2.4.0.rc4). I am running an emulator where
I want to both generate the user-space tracepoints and view them live on the same host (hope this is a valid use case).

I do the following:

# lttng-relayd -d -v -L net://localhost:5344
DEBUG3 [1516/1516]: URI string: net://localhost:5344 (in uri_parse() at uri.c:291)
DEBUG3 [1516/1516]: URI dtype: 1, proto: 1, host: localhost, subdir: , ctrl: 5344, data: 0 (in uri_parse() at uri.c:505)
DEBUG3 [1516/1516]: URI string: tcp://0.0.0.0:5342 (in uri_parse() at uri.c:291)
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)
DEBUG3 [1516/1516]: URI string: tcp://0.0.0.0:5343 (in uri_parse() at uri.c:291)
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)
DEBUG1 [1516/1516]: Signal handler set for SIGTERM, SIGUSR1, SIGPIPE and SIGINT (in set_signal_handler() at main.c:435)

# lttng create s1 --live 200000 -U net://localhost:5344
Session s1 created.
Traces will be written in net://localhost:5344

# lttng enable-channel ch1 -u
ERROR [834/838]: recvmsg inet: Connection reset by peer (in lttcomm_recvmsg_inet_sock() at inet.c:376)
Error: Channel ch1: Relay daemon not compatible (session s1)
Warning: Some command(s) went wrong

As all command are executed on the same host, why compatibility issues?

What commands shall I use to set up a live streaming?

Regards
Anette

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20140219/8ca7f33d/attachment-0001.html>


More information about the lttng-dev mailing list