diff options
author | Karel Zak | 2011-07-27 23:10:01 +0200 |
---|---|---|
committer | Karel Zak | 2011-07-27 23:10:01 +0200 |
commit | 477251f8f5dab0edf94b88d7f2a1af15d5f6b8c0 (patch) | |
tree | 94f5c37489fca985ee0aff80f60824c4aa2f306f /sys-utils/lscpu.1 | |
parent | include: [strutils.c] add list parsers (diff) | |
download | kernel-qcow2-util-linux-477251f8f5dab0edf94b88d7f2a1af15d5f6b8c0.tar.gz kernel-qcow2-util-linux-477251f8f5dab0edf94b88d7f2a1af15d5f6b8c0.tar.xz kernel-qcow2-util-linux-477251f8f5dab0edf94b88d7f2a1af15d5f6b8c0.zip |
lscpu: extend --parse functionality
... to allow define output columns, for example:
$ lscpu --parse=CPU,CORE,NODE,CACHE
# CPU,Core,Node,L1d:L1i:L2
0,0,0,0:0:0
1,1,0,1:1:0
Note that CPU caches are separated by ":" in the new format. The
output for --parse (without the list of the columns) is backwardly
compatible, it means:
$ lscpu --parse
# CPU,Core,Socket,Node,,L1d,L1i,L2
0,0,0,0,,0,0,0
1,1,0,0,,1,1,0
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/lscpu.1')
-rw-r--r-- | sys-utils/lscpu.1 | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys-utils/lscpu.1 b/sys-utils/lscpu.1 index 7a0a97240..4795e91c8 100644 --- a/sys-utils/lscpu.1 +++ b/sys-utils/lscpu.1 @@ -23,8 +23,21 @@ which can be fed to other programs. .BR \-h , " \-\-help" Print a help message. .TP -.BR \-p , " \-\-parse" +.BR \-p , " \-\-parse " \fI[=list]\fP Print out in parsable instead of human-readable format. + +If the \fIlist\fP argument is not given then the default backwardly compatible +output is printed. The backwardly compatible format uses two commas to +separate CPU cache columns. If no CPU caches are identified, then the cache +columns are not printed at all. + +The \fIlist\fP argument is comma delimited list of the columns. Currently +supported are CPU, Core, Node, Socket, Book and Cache columns. If the +\fIlist\fP argument is given then always all requested columns are printed in +the defined order. The Cache columns are separated by ':'. + +Note that the optional \fIlist\fP argument cannot be separated from the +option by a space, the correct form is for example '\fB-p=cpu,node\fP' or '\fB--parse=cpu,node\fP'. .TP .BR \-s , " \-\-sysroot " \fIdirectory\fP Use the specified \fIdirectory\fP as system root. This allows you to inspect |