From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 782C5A00C5; Mon, 31 Oct 2022 16:16:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1EBC240223; Mon, 31 Oct 2022 16:16:52 +0100 (CET) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mails.dpdk.org (Postfix) with ESMTP id 9D0B940151 for ; Mon, 31 Oct 2022 16:16:50 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 58E2E5C0126; Mon, 31 Oct 2022 11:16:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 31 Oct 2022 11:16:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1667229410; x= 1667315810; bh=B/hxKhYQm4YTcTl97h82fA2mV5oAEmS6sP4y1XKh+xE=; b=J /gmByHR8XT3Ide9GJmg5rjveh/ym8BarwLJTNLdGgK/MuXyrup3yHIKn+WQFfsSD M342kdpqKSfi9oIsr+87ouyr3byU4DM3yyzZq2uWob4Y0vHXJ3OT8du91TeEhIc7 298FLrzwR+bHHLobvI3TgpMQAN10Ux4EINhifH1ksp9DFKhiyVYDeQ40j2Exgqn/ KvP7+Nk33NG6cDoJXJaKx0ePmlroBzm+REVCQayJVPDICBj5v9H9LJTaS9j1uXHy CsIssrh2Lk+gY1IM3KhuwTMeh9Uk30Z+JTRtY+hmpNSqpaYkYI2Osz5E98pLpXqm cOHT+J2sEQ7DI/upFImUQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1667229410; x= 1667315810; bh=B/hxKhYQm4YTcTl97h82fA2mV5oAEmS6sP4y1XKh+xE=; b=n TWTBog2UvbFZptP1MWpAsscldw6QYHPUi2CO3womf0Oe3HMGFz27nvBGL/+0XmnJ DN28lVH659MdxoZQntmDwuygWmeMBEeEjoA+9EYwk67IcKuCN1jF+yv6WXBGv46w KJ0YtFvjbDF5hhubweMyDnjLo6fkEtvruRXRy9lEZ0B4FIUWMjlbt91Lra8sHgBn CQ7mJg4/PE2qq/3dxfpg+B5ja2SWIyiYJL0xYAqrLPkzGddrPYgga0Pw1Yh6BKGZ Y9m6UK1J0datuktkacdRUNWZ/Wt0hngWIw93w60UpgXedXl/PXXMqMNeFgQdQzw2 diJuR+62VqYQQjxu6f2Vw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrudefgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieek gfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 31 Oct 2022 11:16:48 -0400 (EDT) From: Thomas Monjalon To: Chengwen Feng Cc: dev@dpdk.org, ciara.power@intel.com, david.marchand@redhat.com, stephen@networkplumber.org, mb@smartsharesystems.com, Bruce Richardson Subject: Re: [PATCH v3] usertools: telemetry pretty print in interactive mode Date: Mon, 31 Oct 2022 16:16:47 +0100 Message-ID: <47636548.MN2xkq1pzW@thomas> In-Reply-To: References: <20221014023338.51464-1-fengchengwen@huawei.com> <20221017074102.55509-1-fengchengwen@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 17/10/2022 11:15, Bruce Richardson: > On Mon, Oct 17, 2022 at 07:41:02AM +0000, Chengwen Feng wrote: > > Currently, the dpdk-telemetry.py show json in raw format under > > interactive mode, which is not good for human reading. > > > > E.g. The command '/ethdev/xstats,0' will output: > > {"/ethdev/xstats": {"rx_good_packets": 0, "tx_good_packets": 0, > > "rx_good_bytes": 0, "tx_good_bytes": 0, "rx_missed_errors": 0, > > "rx_errors": 0, "tx_errors": 0, "rx_mbuf_allocation_errors": 0, > > "rx_q0_packets": 0,...}} > > > > This patch supports json pretty print by adding extra indent=2 > > parameter under interactive mode, so the same command will output: > > { > > "/ethdev/xstats": { > > "rx_good_packets": 0, > > "tx_good_packets": 0, > > "rx_good_bytes": 0, > > "tx_good_bytes": 0, > > "rx_missed_errors": 0, > > "rx_errors": 0, > > "rx_mbuf_allocation_errors": 0, > > "rx_q0_packets": 0, > > ... > > } > > } > > > > Note: the non-interactive mode is made machine-readable and remains the > > original way (it means don't use indent to pretty print). > > > > Signed-off-by: Chengwen Feng > > Acked-by: David Marchand > > Acked-by: Ciara Power > > > Tested-by: Bruce Richardson Applied, thanks.