From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.lttng.org (lists.lttng.org [167.114.26.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2C3FEC25B7E for ; Mon, 3 Jun 2024 03:01:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1717383699; bh=yO8mvWT7BUBueWDPlsVPXLnyZj1LQT0h9O9FKZY/bOQ=; h=To:Date:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=wNxyZ4KeVbm2tqgm7rcXorsqVvbAAQ7EXZAwVyWXGnC0/azQKtmHzK/+ivHGbXcn/ LxVl0wjlHzEwy/ptyjXmmEPqUwfxB0cxkmwyfdlJhBCkkt20UiKD2uazYqQ6QT+aX/ XhsrktBa6ZRX4feaRMTIwtfGkv4x5gaZ10mESfEkywDfQENebU7x6BDbe3SUI323pS lzlfZgCd2/gOLs8mXEPY/aAVWXjSyS87Tn5HbfyttS9uCT2jPYcVC8OiwJI0tRpPCx OIKpGxZ8NcbmO6j96XoX4yfHXLKF1a6bb7ShWnaCxrNCf4oIMUCsoy/ZovskZCbvld hvmLUYxr3wooA== Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4Vsz5b0qMQz2s7B; Sun, 2 Jun 2024 23:01:39 -0400 (EDT) Received: from smtp-fw-80009.amazon.com (smtp-fw-80009.amazon.com [99.78.197.220]) by lists.lttng.org (Postfix) with ESMTPS id 4Vsz5Y0R03z2s79 for ; Sun, 2 Jun 2024 23:01:36 -0400 (EDT) X-IronPort-AV: E=Sophos;i="6.08,210,1712620800"; d="scan'208,217";a="93660630" Thread-Topic: [lttng-dev] [lttng-relayd] is there existing cases for relayd to stream over Android usb based adb? Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev) ([10.25.36.210]) by smtp-border-fw-80009.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2024 03:01:34 +0000 Received: from EX19MTAUWA001.ant.amazon.com [10.0.21.151:58463] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.22.28:2525] with esmtp (Farcaster) id 28b32230-6a4a-4345-8000-394ae293b20b; Mon, 3 Jun 2024 03:01:33 +0000 (UTC) X-Farcaster-Flow-ID: 28b32230-6a4a-4345-8000-394ae293b20b Received: from EX19D003ANC001.ant.amazon.com (10.37.240.216) by EX19MTAUWA001.ant.amazon.com (10.250.64.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Mon, 3 Jun 2024 03:01:32 +0000 Received: from EX19D003ANC001.ant.amazon.com (10.37.240.216) by EX19D003ANC001.ant.amazon.com (10.37.240.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1258.28; Mon, 3 Jun 2024 03:01:31 +0000 Received: from EX19D003ANC001.ant.amazon.com ([fe80::ed4e:7258:fa8c:17e8]) by EX19D003ANC001.ant.amazon.com ([fe80::ed4e:7258:fa8c:17e8%5]) with mapi id 15.02.1258.028; Mon, 3 Jun 2024 03:01:31 +0000 To: Kienan Stewart , "lttng-dev@lists.lttng.org" Thread-Index: AQHaslKH7CI0j5/u4E6iXx4NZ5jN4bGwJewAgAU50fQ= Date: Mon, 3 Jun 2024 03:01:31 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.119.100.232] MIME-Version: 1.0 Subject: Re: [lttng-dev] [lttng-relayd] is there existing cases for relayd to stream over Android usb based adb? X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "Wu, Yannan via lttng-dev" Reply-To: "Wu, Yannan" Content-Type: multipart/mixed; boundary="===============5939134720063065134==" Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" --===============5939134720063065134== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_e3420bc8ac2f4ad8911eb91bbca7aa82amazoncom_" --_000_e3420bc8ac2f4ad8911eb91bbca7aa82amazoncom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 c= onflict in-between. Do we have any other way to workaround it? Amanda ________________________________ From: Kienan Stewart 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 cli= ck 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 --_000_e3420bc8ac2f4ad8911eb91bbca7aa82amazoncom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I checked lttng-relayd source code, we do need to bind to the exact sock= et 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 confir= m 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<= br>
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 developmen= t 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 and= roid
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 andro= id 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 ad= b.
> Here is the situation, during debugging some network related issues, w= e
> dont want the trace data to be streamed via network to cause extra loa= d
> to the system being profiled. Then we select to connect lttng-relayd > with adb via port forwarding so that the data is "forward" t= o the host.
>
> *Here is the set up and the problem:*
>
> for the device:  adb reverse tcp:5342 tcp:5342; adb reverse tcp:5= 343
> 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<= br> > 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 li= ve
> 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
--_000_e3420bc8ac2f4ad8911eb91bbca7aa82amazoncom_-- --===============5939134720063065134== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev --===============5939134720063065134==--