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 99BFD41DFD; Tue, 7 Mar 2023 08:33:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4CEED40E03; Tue, 7 Mar 2023 08:33:21 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 1F1844067E for ; Tue, 7 Mar 2023 08:33:20 +0100 (CET) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v3 0/2] Add option to timestamp console log Date: Tue, 7 Mar 2023 08:33:17 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D877C1@smartserver.smartshare.dk> In-Reply-To: <20230306192810.106154-1-stephen@networkplumber.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v3 0/2] Add option to timestamp console log Thread-Index: AdlQYc5nA4jOKRoJT6KCcovWjyMm7QAYtm0g References: <20200814173441.23086-1-stephen@networkplumber.org> <20230306192810.106154-1-stephen@networkplumber.org> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Stephen Hemminger" , 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 > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Monday, 6 March 2023 20.28 >=20 > This is a reprise of earlier patch to add timestamp to console > messages. >=20 > Example: > # dpdk-testpmd -l 1-4 -n 4 --vdev net_null0 --log-timestamp -- -i > EAL: Detected CPU lcores: 16 > EAL: Detected NUMA nodes: 1 > EAL: Detected static linkage of DPDK > EAL: Multi-process socket /var/run/dpdk/rte/mp_socket > EAL: Selected IOVA mode 'VA' > Interactive-mode selected > [ 0.191407] testpmd: create a new mbuf pool : = n=3D171456, > size=3D2176, socket=3D0 > [ 0.191510] testpmd: preferred mempool ops selected: ring_mp_mc This is useful. Here's some feature creep: Since the timestamp output is configurable, = there is no need to settle on one specific timestamp format. The option = could allow a choice between MONOTONIC and REALTIME, with an option for = REALTIME to include the date in ISO 8601 format (YYYY-MM-DD). And = REALTIME could be UTC or local time. You could consider taking a format = string for strftime(), with the extension that %f expands to 6 digit = microseconds like in Python [1]. [1]: = https://docs.python.org/3/library/datetime.html#strftime-and-strptime-for= mat-codes With or without feature creep, Series-acked-by: Morten Br=F8rup