lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
From: "Wu, Yannan via lttng-dev" <lttng-dev@lists.lttng.org>
To: Kienan Stewart <kstewart@efficios.com>,
	"lttng-dev@lists.lttng.org" <lttng-dev@lists.lttng.org>
Subject: Re: [lttng-dev] [lttng-relayd] is there existing cases for relayd to stream over Android usb based adb?
Date: Mon, 3 Jun 2024 03:01:31 +0000	[thread overview]
Message-ID: <e3420bc8ac2f4ad8911eb91bbca7aa82@amazon.com> (raw)
In-Reply-To: <b974bf9f-b511-4fdb-8d67-93a6c1b273ab@efficios.com>


[-- Attachment #1.1: Type: text/plain, Size: 3946 bytes --]

I checked lttng-relayd source code, we do need to bind to the exact socket for further process. As adb reverse bind to the socket as well there is a conflict in-between. Do we have any other way to workaround it?

Amanda

________________________________
From: Kienan Stewart <kstewart@efficios.com>
Sent: Friday, May 31, 2024 3:12:16 AM
To: Wu, Yannan; lttng-dev@lists.lttng.org
Subject: RE: [EXTERNAL] [lttng-dev] [lttng-relayd] is there existing cases for relayd to stream over Android usb based adb?

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.



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@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

[-- Attachment #1.2: Type: text/html, Size: 5521 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

      parent reply	other threads:[~2024-06-03  3:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30  5:53 [lttng-dev] [lttng-relayd] is there existing cases for relayd to stream over Android usb based adb? Wu, Yannan via lttng-dev
2024-05-30 19:12 ` Kienan Stewart via lttng-dev
2024-06-03  2:55   ` Wu, Yannan via lttng-dev
2024-06-04 15:09     ` Mathieu Desnoyers via lttng-dev
2024-06-04 15:25       ` Wu, Yannan via lttng-dev
2024-06-04 15:56         ` Mathieu Desnoyers via lttng-dev
2024-06-03  3:01   ` Wu, Yannan via lttng-dev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e3420bc8ac2f4ad8911eb91bbca7aa82@amazon.com \
    --to=lttng-dev@lists.lttng.org \
    --cc=kstewart@efficios.com \
    --cc=yannanwu@amazon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).