summaryrefslogtreecommitdiffstats
path: root/sys-utils/lscpu.h
diff options
context:
space:
mode:
authorKarel Zak2019-03-19 13:47:11 +0100
committerKarel Zak2019-03-19 14:11:20 +0100
commit0e86bc8406959d0d56194d4f404b780e6b70caa4 (patch)
treea31307174312e69ecf3f007822c8367014c662a9 /sys-utils/lscpu.h
parentlib/path: remove extra semi-colons (diff)
downloadkernel-qcow2-util-linux-0e86bc8406959d0d56194d4f404b780e6b70caa4.tar.gz
kernel-qcow2-util-linux-0e86bc8406959d0d56194d4f404b780e6b70caa4.tar.xz
kernel-qcow2-util-linux-0e86bc8406959d0d56194d4f404b780e6b70caa4.zip
lscpu: add --caches
$ lscpu -C NAME ONE-SIZE ALL-SIZE WAYS TYPE LEVEL L3 8M 8M 16 Unified 3 L2 256K 1M 8 Unified 2 L1i 32K 128K 8 Instruction 1 L1d 32K 128K 8 Data 1 The patch also updates extra caches (s390) output in lsblk summary to be compatible with output about normal caches. Addresses: https://github.com/karelzak/util-linux/issues/663 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/lscpu.h')
-rw-r--r--sys-utils/lscpu.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys-utils/lscpu.h b/sys-utils/lscpu.h
index a8311b33d..36c7e41aa 100644
--- a/sys-utils/lscpu.h
+++ b/sys-utils/lscpu.h
@@ -48,7 +48,10 @@ enum {
/* cache(s) description */
struct cpu_cache {
char *name;
- char *size;
+ char *type;
+ int level;
+ int ways;
+ uint64_t size;
int nsharedmaps;
cpu_set_t **sharedmaps;
@@ -171,6 +174,7 @@ enum {
OUTPUT_SUMMARY = 0, /* default */
OUTPUT_PARSABLE, /* -p */
OUTPUT_READABLE, /* -e */
+ OUTPUT_CACHES /* -C */
};
enum {
@@ -186,6 +190,7 @@ struct lscpu_modifier {
online:1, /* print online CPUs */
offline:1, /* print offline CPUs */
json:1, /* JSON output format */
+ bytes:1, /* output sizes in bytes */
physical:1; /* use physical numbers */
};