Message ID | 20210913105137.130097-1-bruce.richardson@intel.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 96AAFA0C45; Mon, 13 Sep 2021 12:51:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0FC0C40151; Mon, 13 Sep 2021 12:51:59 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id D4F2B4014F for <dev@dpdk.org>; Mon, 13 Sep 2021 12:51:57 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10105"; a="219763464" X-IronPort-AV: E=Sophos;i="5.85,288,1624345200"; d="scan'208";a="219763464" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2021 03:51:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,288,1624345200"; d="scan'208";a="696638904" Received: from silpixa00399126.ir.intel.com ([10.237.223.29]) by fmsmga006.fm.intel.com with ESMTP; 13 Sep 2021 03:51:53 -0700 From: Bruce Richardson <bruce.richardson@intel.com> To: dev@dpdk.org Cc: ciara.power@intel.com, david.hunt@intel.com, Bruce Richardson <bruce.richardson@intel.com> Date: Mon, 13 Sep 2021 11:51:34 +0100 Message-Id: <20210913105137.130097-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 0/3] improvements for telemetry script X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series | improvements for telemetry script | |
Message
Bruce Richardson
Sept. 13, 2021, 10:51 a.m. UTC
Patch 1 fixes errors reported by flake8 in the telemetry python script. Inspired by the work by Dave Hunt [1] the final two patches look to adjust the script so that it works nicer when commands come from an input pipe rather than from an interactive terminal. Without this set: $ echo "/eal/params" | ./usertools/dpdk-telemetry.py Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2 {"version": "DPDK 21.11.0-rc0", "pid": 130033, "max_output_len": 16384} Connected to application: "dpdk-test" --> {"/eal/params": ["./build/app/test/dpdk-test", "-c", "F", "--no-huge"]} --> Traceback (most recent call last): File "/home/bruce/dpdk.org/./usertools/dpdk-telemetry.py", line 109, in <module> handle_socket(os.path.join(rdir, 'dpdk_telemetry.{}'.format(TELEMETRY_VERSION))) File "/home/bruce/dpdk.org/./usertools/dpdk-telemetry.py", line 78, in handle_socket text = input('--> ').strip() EOFError: EOF when reading a line With this patchset: $ echo "/eal/params" | ./usertools/dpdk-telemetry.py {"/eal/params": ["./build/app/test/dpdk-test", "-c", "F", "--no-huge"]} [1] http://patches.dpdk.org/project/dpdk/patch/20210909155625.24581-1-david.hunt@intel.com/ Bruce Richardson (3): usertools/dpdk-telemetry: fix flake8 errors usertools/dpdk_telemetry: fix handling EOF for input pipe usertools/dpdk-telemetry: silence prompts for input pipes usertools/dpdk-telemetry.py | 38 ++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) -- 2.30.2
Comments
Hi Bruce, >-----Original Message----- >From: Richardson, Bruce <bruce.richardson@intel.com> >Sent: Monday 13 September 2021 11:52 >To: dev@dpdk.org >Cc: Power, Ciara <ciara.power@intel.com>; Hunt, David ><david.hunt@intel.com>; Richardson, Bruce <bruce.richardson@intel.com> >Subject: [PATCH 0/3] improvements for telemetry script > >Patch 1 fixes errors reported by flake8 in the telemetry python script. >Inspired by the work by Dave Hunt [1] the final two patches look to adjust the >script so that it works nicer when commands come from an input pipe rather >than from an interactive terminal. > >Without this set: > $ echo "/eal/params" | ./usertools/dpdk-telemetry.py > Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2 > {"version": "DPDK 21.11.0-rc0", "pid": 130033, "max_output_len": 16384} > Connected to application: "dpdk-test" > --> {"/eal/params": ["./build/app/test/dpdk-test", "-c", "F", "--no-huge"]} > --> Traceback (most recent call last): > File "/home/bruce/dpdk.org/./usertools/dpdk-telemetry.py", line 109, in ><module> > handle_socket(os.path.join(rdir, >'dpdk_telemetry.{}'.format(TELEMETRY_VERSION))) > File "/home/bruce/dpdk.org/./usertools/dpdk-telemetry.py", line 78, in >handle_socket > text = input('--> ').strip() > EOFError: EOF when reading a line > >With this patchset: > $ echo "/eal/params" | ./usertools/dpdk-telemetry.py > {"/eal/params": ["./build/app/test/dpdk-test", "-c", "F", "--no-huge"]} > > >[1] http://patches.dpdk.org/project/dpdk/patch/20210909155625.24581-1- >david.hunt@intel.com/ > >Bruce Richardson (3): > usertools/dpdk-telemetry: fix flake8 errors > usertools/dpdk_telemetry: fix handling EOF for input pipe > usertools/dpdk-telemetry: silence prompts for input pipes > > usertools/dpdk-telemetry.py | 38 ++++++++++++++++++++++--------------- > 1 file changed, 23 insertions(+), 15 deletions(-) > >-- >2.30.2 For the series, Acked-by: Ciara Power <ciara.power@intel.com> Thanks!
> >Patch 1 fixes errors reported by flake8 in the telemetry python script. > >Inspired by the work by Dave Hunt [1] the final two patches look to adjust the > >script so that it works nicer when commands come from an input pipe rather > >than from an interactive terminal. > > > >Without this set: > > $ echo "/eal/params" | ./usertools/dpdk-telemetry.py > > Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2 > > {"version": "DPDK 21.11.0-rc0", "pid": 130033, "max_output_len": 16384} > > Connected to application: "dpdk-test" > > --> {"/eal/params": ["./build/app/test/dpdk-test", "-c", "F", "--no-huge"]} > > --> Traceback (most recent call last): > > File "/home/bruce/dpdk.org/./usertools/dpdk-telemetry.py", line 109, in > ><module> > > handle_socket(os.path.join(rdir, > >'dpdk_telemetry.{}'.format(TELEMETRY_VERSION))) > > File "/home/bruce/dpdk.org/./usertools/dpdk-telemetry.py", line 78, in > >handle_socket > > text = input('--> ').strip() > > EOFError: EOF when reading a line > > > >With this patchset: > > $ echo "/eal/params" | ./usertools/dpdk-telemetry.py > > {"/eal/params": ["./build/app/test/dpdk-test", "-c", "F", "--no-huge"]} > > > > > >[1] http://patches.dpdk.org/project/dpdk/patch/20210909155625.24581-1- > >david.hunt@intel.com/ > > > >Bruce Richardson (3): > > usertools/dpdk-telemetry: fix flake8 errors > > usertools/dpdk_telemetry: fix handling EOF for input pipe > > usertools/dpdk-telemetry: silence prompts for input pipes > > For the series, > Acked-by: Ciara Power <ciara.power@intel.com> Applied, thanks.