From: Benno Schulenberg <bensberg@telfort.nl>
To: util-linux@vger.kernel.org
Subject: [PATCH 08/10] lscpu: (man) don't refer to a missing section, and improve some wordings
Date: Thu, 17 Apr 2025 11:48:22 +0200 [thread overview]
Message-ID: <20250417094825.20870-8-bensberg@telfort.nl> (raw)
In-Reply-To: <20250417094825.20870-1-bensberg@telfort.nl>
Three years ago commit aa049eabb3 removed the COLUMNS section but forgot
to remove the reference to it. Replace the reference with a referral to
the --help text.
In the bargain, join two paragraphs that belong together, improve some
wordings, and sort two options.
This fixes #2590 (https://github.com/util-linux/util-linux/issues/2590).
Reported-by: Fabien Malfoy
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
sys-utils/lscpu.1.adoc | 31 ++++++++++++++++++++-----------
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/sys-utils/lscpu.1.adoc b/sys-utils/lscpu.1.adoc
index f86f531fd..940b1bfeb 100644
--- a/sys-utils/lscpu.1.adoc
+++ b/sys-utils/lscpu.1.adoc
@@ -22,8 +22,11 @@ The default output formatting on terminal is subject to change and maybe optimiz
In virtualized environments, the CPU architecture information displayed reflects the configuration of the guest operating system which is typically different from the physical (host) system. On architectures that support retrieving physical topology information, *lscpu* also displays the number of physical sockets, chips, cores in the host system.
-Options that result in an output table have a _list_ argument. Use this argument to customize the command output. Specify a comma-separated list of column labels to limit the output table to only the specified columns, arranged in the specified order. See *COLUMNS* for a list of valid column labels. The column labels are not case sensitive.
-
+Options that produce an output table accept an optional _list_ argument.
+This _list_ is a comma-separated series of column labels to limit the
+table to only the specified columns, arranged in the specified order.
+Use *--help* to see a list of valid column labels.
+The labels are case insensitive.
Not all columns are supported on all architectures. If an unsupported column is specified, *lscpu* prints the column but does not provide any data for it.
The cache sizes are reported as summary from all CPUs. The versions before v2.34 reported per-core sizes, but this output was confusing due to complicated CPUs topology and the way how caches are shared between CPUs. For more details about caches see *--cache*. Since version v2.37 *lscpu* follows cache IDs as provided by Linux kernel and it does not always start from zero.
@@ -44,37 +47,46 @@ Display details about CPU caches. For details about available information see *-
+
If the _list_ argument is omitted, all columns for which data is available are included in the command output.
+
-When specifying the _list_ argument, the string of option, equal sign (=), and _list_ must not contain any blanks or other whitespace. Examples: *-C=NAME,ONE-SIZE* or *--caches=NAME,ONE-SIZE*.
+When specifying the _list_ argument, the option string plus the
+equal sign (=) plus the _list_ may not contain any whitespace.
+Examples: *-C=NAME,ONE-SIZE* or *--caches=NAME,ONE-SIZE*.
+
The default list of columns may be extended if list is specified in the format +list (e.g., **lscpu -C=+ALLOC-POLICY**).
*-c*, *--offline*::
Limit the output to offline CPUs. This option may only be specified together with option *-e* or *-p*.
-*--hierarchic*[**=**_when_]::
-Use subsections in summary output. For backward compatibility, the default is to use subsections only when output on a terminal and flattened output on a non-terminal. The optional argument _when_ can be *never*, *always* or *auto*. If the _when_ argument is omitted, it defaults to "always".
-
*-e*, *--extended*[**=**_list_]::
Display the CPU information in human-readable format.
+
If the _list_ argument is omitted, the default columns are included in the command output. The default output is subject to change.
+
-When specifying the _list_ argument, the string of option, equal sign (=), and _list_ must not contain any blanks or other whitespace. Examples: '*-e=cpu,node*' or '*--extended=cpu,node*'.
+When specifying the _list_ argument, the option string plus the
+equal sign (=) plus the _list_ may not contain any whitespace.
+Examples: *-e=cpu,node* or *--extended=cpu,node*.
+
The default list of columns may be extended if list is specified in the format +list (e.g., lscpu -e=+MHZ).
+*--hierarchic*[**=**_when_]::
+Use subsections in summary output. For backward compatibility, the default is to use subsections only when output on a terminal, and to use flattened output on a non-terminal. The optional argument _when_ can be *never*, *always*, or *auto*. If the _when_ argument is omitted, it defaults to *always*.
+
*-J*, *--json*::
Use JSON output format for the default summary or extended output (see
*--extended*). For backward compatibility, JSON output follows the default
summary behavior for non-terminals (e.g., pipes) where subsections are missing. See
also *--hierarchic*.
+*--output-all*::
+Output all available columns. This option must be combined with either *--extended*, *--parse*, or *--caches*.
+
*-p*, *--parse*[**=**_list_]::
Optimize the command output for easy parsing.
+
If the _list_ argument is omitted, the command output is compatible with earlier versions of *lscpu*. In this compatible format, two commas are used to separate CPU cache columns. If no CPU caches are identified the cache column is omitted. If the _list_ argument is used, cache columns are separated with a colon (:).
+
-When specifying the _list_ argument, the string of option, equal sign (=), and _list_ must not contain any blanks or other whitespace. Examples: '*-p=cpu,node*' or '*--parse=cpu,node*'.
+When specifying the _list_ argument, the option string plus the
+equal sign (=) plus the _list_ may not contain any whitespace.
+Examples: *-p=cpu,online,mhz* or *--parse=cpu,online,mhz*.
+
The default list of columns may be extended if list is specified in the format +list (e.g., lscpu -p=+MHZ).
@@ -92,9 +104,6 @@ Display physical IDs for all columns with topology elements (core, socket, etc.)
+
The CPU logical numbers are not affected by this option.
-*--output-all*::
-Output all available columns. This option must be combined with either *--extended*, *--parse* or *--caches*.
-
include::man-common/help-version.adoc[]
== BUGS
--
2.48.1
next prev parent reply other threads:[~2025-04-17 9:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-17 9:48 [PATCH 01/10] bits: (man) normalize the markup and improve some layout Benno Schulenberg
2025-04-17 9:48 ` [PATCH 02/10] last: (man) correct the descriptions of --present and --since Benno Schulenberg
2025-04-17 9:48 ` [PATCH 03/10] last: (man) reduce an inflated table to sane proportions Benno Schulenberg
2025-04-17 9:48 ` [PATCH 04/10] rtcwake: " Benno Schulenberg
2025-04-17 9:48 ` [PATCH 05/10] terminal-colors.d: (man) reduce two tables to succinct lists Benno Schulenberg
2025-04-17 9:48 ` [PATCH 06/10] renice: in usage text, condense the oververbose description of option -n Benno Schulenberg
2025-04-17 9:48 ` [PATCH 07/10] renice: (man) reword several things, to be clearer, and improve some markup Benno Schulenberg
2025-04-17 9:48 ` Benno Schulenberg [this message]
2025-04-17 9:48 ` [PATCH 09/10] docs: correct misspellings of "may be" and mistaken uses of "overwritten" Benno Schulenberg
2025-04-17 9:48 ` [PATCH 10/10] docs: correct mistaken uses of "overwrite" to say "override" instead Benno Schulenberg
2025-04-17 9:58 ` [PATCH 01/10] bits: (man) normalize the markup and improve some layout Robin Jarry
2025-04-24 9:57 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250417094825.20870-8-bensberg@telfort.nl \
--to=bensberg@telfort.nl \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox