From nobody Mon Oct 16 16:59:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8Ncp6NZQz4xZZC; Mon, 16 Oct 2023 16:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S8Ncp5glfz3Sld; Mon, 16 Oct 2023 16:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697475562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dB13Obsz5aewrBNqr7WPN8xjPbQucBBV+dILOJm6oHU=; b=H/jYuHY++O7ZOt9YKlDsYCJNZ4YOaoG+0K8+4h2x7sHGMsZXILE0vTG00nD44irMXUV/Q1 nc02VNnooPIUvwCqwc1brmZ597YKAi5Lh5VDPBQn0fby3xPhRB3xlkOzmFXavegNJo7H8z DW+/f7CzuAMna41n5kx2oECHrOdiSVE6mUc2mprwcuDXWcNNzkabMRdK6oT1DvoHXqSMm9 /KLFTon26xBK3GYPJyL7VgSDjej5upy8jogJpZQZI7/SFwvVz3tf/QfEyKwWZf9wgsonkk 6ZBAsqn5PPgrnDNdPhUvJwNh8D6jgK1zYn/Vp25pboGdj0FK7mO5v5dRNEcspQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697475562; a=rsa-sha256; cv=none; b=STXIQrg9PXZkCbQPafxw5kPNLpyVa177uqDWksYcmxkp638Xo+j+qyPa7SlaWnIiC0urNR ORerqU1NZNhcoFP0VHhJCaz7U5i7oXqwGIeBv1hrHBPEnEt0u8EwQ0owrCWpn+1Ig1Y1KI oyjAp6stgorY/MTdGTw5/KkeBarhHUDc6O28WPKTGHE/8xiBD+eb4mIj8Y/C+4epvWgqgG 6eeotZiCqcGd+a443x3zkYLK8llaW04tMgCrpKApldvitoMqj4EiIzlxdyrZB37koEhgO2 /a8VdsyuA3BcQInlZlQW/H3yRUeaGP60O5qroXJI9szt/31Jx6W+ljA+uDn7MA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697475562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dB13Obsz5aewrBNqr7WPN8xjPbQucBBV+dILOJm6oHU=; b=Dmm7aPm1ZW7LVnOkBhPpzP7PbEFfstPFBRbOXLkMDe7IzepsXe5ozdKBezF0pXzEJxvJu3 bJe+C/N2jT43c9mcdasIXRU+pC8tp/3fY58as1I4rk52b9T2CD/aRRI/4aG3MXpQobVUKQ b+K/SlnV60JpbRQvudGQFWghKFLFWMHXjWq+GPkDVKkxxChfTxUdYVMBPNPonA67tYyMJL KW243gV/oHBkMM+vO+2Cq8YkCt/yndTBdbiSQiGTm98uR0yXdEC/jXrx4xYW7TycI2HUbL B+G6Y7ZJRg2ZFPBw5VOKGUzuNQXfOs7KzOtk6VwygDF0ZSEBQ1rJYUuuCGA8FA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8Ncp4h2Pzp05; Mon, 16 Oct 2023 16:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39GGxMAM029013; Mon, 16 Oct 2023 16:59:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GGxMdV029010; Mon, 16 Oct 2023 16:59:22 GMT (envelope-from git) Date: Mon, 16 Oct 2023 16:59:22 GMT Message-Id: <202310161659.39GGxMdV029010@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 8f9f7b4a427f - main - procstat auxv: widen COMM column to MAXCOMLEN List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f9f7b4a427f2518e978600794f013cb711dfb86 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8f9f7b4a427f2518e978600794f013cb711dfb86 commit 8f9f7b4a427f2518e978600794f013cb711dfb86 Author: Brooks Davis AuthorDate: 2023-10-16 16:53:53 +0000 Commit: Brooks Davis CommitDate: 2023-10-16 16:58:54 +0000 procstat auxv: widen COMM column to MAXCOMLEN For reasons unknown, procstat subcommands typically display the command in a 16+overflow column format. However, the command may be up to MAXCOMLEN (19) characters long causing the column to spill into the next one. Since there's plenty of room in the auxv case, bump the column width up to 19 to avoid this issue. While this is a format change 1) users who want to parse the data should use libxo output and 2) this makes it possible to parse reliably with cut. Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42202 --- usr.bin/procstat/procstat_auxv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/procstat/procstat_auxv.c b/usr.bin/procstat/procstat_auxv.c index 9c37c511d190..7b68ac72f724 100644 --- a/usr.bin/procstat/procstat_auxv.c +++ b/usr.bin/procstat/procstat_auxv.c @@ -53,16 +53,16 @@ procstat_auxv(struct procstat *procstat, struct kinfo_proc *kipp) static char prefix[256]; if ((procstat_opts & PS_OPT_NOHEADER) == 0) - xo_emit("{T:/%5s %-16s %-16s %-16s}\n", "PID", "COMM", "AUXV", + xo_emit("{T:/%5s %-19s %-16s %-16s}\n", "PID", "COMM", "AUXV", "VALUE"); auxv = procstat_getauxv(procstat, kipp, &count); if (auxv == NULL) return; - snprintf(prefix, sizeof(prefix), "%5d %-16s", kipp->ki_pid, - kipp->ki_comm); + snprintf(prefix, sizeof(prefix), "%5d %-19s", kipp->ki_pid, + kipp->ki_comm); - xo_emit("{e:process_id/%5d/%d}{e:command/%-16s/%s}", kipp->ki_pid, + xo_emit("{e:process_id/%5d/%d}{e:command/%-19s/%s}", kipp->ki_pid, kipp->ki_comm); for (i = 0; i < count; i++) {