[lttng-dev] [lttng-relayd] is there existing cases for relayd to stream over Android usb based adb?
Kienan Stewart
kstewart at efficios.com
Thu May 30 15:12:16 EDT 2024
Hi Amanda,
I'd like to confirm my understanding the situation.
Android device
- Running lttng-sessiond with one or more configured sessions
Development device
- Connected to the android device over usb using adb
You want want the data captured on the android device to be streamed via
the usb connection rather than the other networks on the android device.
Could you expand on the commands you used to set up the tracing sessions
and relay, and where each of those commands were run?
It sounds to me like you might want to be doing something like the
following:
(Development device) Start lttng-relayd:
- tcp://0.0.0.0:5342 and :5343 will be bound on the development device
- tcp://127.0.0.1:5344 will be available for the live reader
(Development device) Create the reverses for the following ports: 5342
and 5343
- At this point :5342 and :5343 should be available on the android
device and reach the relayd running on the development device
(Android device) Start lttng-sessiond
(Android device) Create session(s): `lttng create -U tcp://localhost/
- Using `-U/--set-url`, no relayd will be spawned on the android device
(Android device) Start session(s)
This setup should have the relayd running on the development and writing
the traces there and/or viewing them with a live viewer. On the android
device, the UST applications (if any) will connect to the local sessiond
and consumers, which will shuttle the information over :5342 and :5343
to the developer device via the reverse sockets.
Please note that I didn't have time to test this, so there might be some
mistakes. As I requested above, clear details of the exact commands you
use for the tracing setup would be very helpful to have the clearest
understanding of what you're doing.
hope this helps,
kienan
On 5/30/24 1:53 AM, Wu, Yannan via lttng-dev wrote:
> Hihi, there,
>
> I am currently working on enabling lttng live mode over android usb adb.
> Here is the situation, during debugging some network related issues, we
> dont want the trace data to be streamed via network to cause extra load
> to the system being profiled. Then we select to connect lttng-relayd
> with adb via port forwarding so that the data is "forward" to the host.
>
> *Here is the set up and the problem:*
>
> for the device: adb reverse tcp:5342 tcp:5342; adb reverse tcp:5343
> tcp:5343; adb reverse tcp:5344 tcp:5344
> Then starting up lttng with --live enabled.
>
> *What is expected:*
> lttng start streaming to the localhost.
> *What is seen: *
> the lttng-relayd failed to start. For unable binding to the socket.
>
> *The cause of this issue: *
>
> both adb reverse and lttng relayd need binding to the socket which is
> conflict with each other.
>
>
> So what I wanna ask is, for embedded system use cases, do we have
> successful use cases among team that could stream the trace data in live
> mode to the host with usb based adb? If not, any idea or suggestion to
> me on how to process forward?
>
> Amanda
>
>
>
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
More information about the lttng-dev
mailing list