From 477251f8f5dab0edf94b88d7f2a1af15d5f6b8c0 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 27 Jul 2011 23:10:01 +0200 Subject: 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 --- sys-utils/lscpu.1 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'sys-utils/lscpu.1') 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 -- cgit v1.2.3-55-g7522