1LSMEM(1)                         User Commands                        LSMEM(1)
2
3
4

NAME

6       lsmem - list the ranges of available memory with their online status
7

SYNOPSIS

9       lsmem [options]
10

DESCRIPTION

12       The lsmem command lists the ranges of available memory with their
13       online status. The listed memory blocks correspond to the memory block
14       representation in sysfs. The command also shows the memory block size
15       and the amount of memory in online and offline state.
16
17       The default output is compatible with original implementation from
18       s390-tools, but it’s strongly recommended to avoid using default
19       outputs in your scripts. Always explicitly define expected columns by
20       using the --output option together with a columns list in environments
21       where a stable output is required.
22
23       The lsmem command lists a new memory range always when the current
24       memory block distinguish from the previous block by some output column.
25       This default behavior is possible to override by the --split option
26       (e.g., lsmem --split=ZONES). The special word "none" may be used to
27       ignore all differences between memory blocks and to create as large as
28       possible continuous ranges. The opposite semantic is --all to list
29       individual memory blocks.
30
31       Note that some output columns may provide inaccurate information if a
32       split policy forces lsmem to ignore differences in some attributes. For
33       example if you merge removable and non-removable memory blocks to the
34       one range than all the range will be marked as non-removable on lsmem
35       output.
36
37       Not all columns are supported on all systems. If an unsupported column
38       is specified, lsmem prints the column but does not provide any data for
39       it.
40
41       Use the --help option to see the columns description.
42

OPTIONS

44       -a, --all
45           List each individual memory block, instead of combining memory
46           blocks with similar attributes.
47
48       -b, --bytes
49           Print the sizes in bytes rather than in a human-readable format.
50
51           By default, the unit, sizes are expressed in, is byte, and unit
52           prefixes are in power of 2^10 (1024). Abbreviations of symbols are
53           exhibited truncated in order to reach a better readability, by
54           exhibiting alone the first letter of them; examples: "1 KiB" and "1
55           MiB" are respectively exhibited as "1 K" and "1 M", then omitting
56           on purpose the mention "iB", which is part of these abbreviations.
57
58       -J, --json
59           Use JSON output format.
60
61       -n, --noheadings
62           Do not print a header line.
63
64       -o, --output list
65           Specify which output columns to print. Use --help to get a list of
66           all supported columns. The default list of columns may be extended
67           if list is specified in the format +list (e.g., lsmem -o +NODE).
68
69       --output-all
70           Output all available columns.
71
72       -P, --pairs
73           Produce output in the form of key="value" pairs. All potentially
74           unsafe value characters are hex-escaped (\x<code>).
75
76       -r, --raw
77           Produce output in raw format. All potentially unsafe characters are
78           hex-escaped (\x<code>).
79
80       -S, --split list
81           Specify which columns (attributes) use to split memory blocks to
82           ranges. The supported columns are STATE, REMOVABLE, NODE and ZONES,
83           or "none". The other columns are silently ignored. For more details
84           see DESCRIPTION above.
85
86       -s, --sysroot directory
87           Gather memory data for a Linux instance other than the instance
88           from which the lsmem command is issued. The specified directory is
89           the system root of the Linux instance to be inspected.
90
91       -h, --help
92           Display help text and exit.
93
94       -V, --version
95           Print version and exit.
96
97       --summary[=when]
98           This option controls summary lines output. The optional argument
99           when can be never, always or only. If the when argument is omitted,
100           it defaults to "only". The summary output is suppressed for --raw,
101           --pairs and --json.
102

AUTHORS

104       lsmem was originally written by Gerald Schaefer for s390-tools in Perl.
105       The C version for util-linux was written by Clemens von Mann, Heiko
106       Carstens and Karel Zak.
107

SEE ALSO

109       chmem(8)
110

REPORTING BUGS

112       For bug reports, use the issue tracker at
113       https://github.com/util-linux/util-linux/issues.
114

AVAILABILITY

116       The lsmem command is part of the util-linux package which can be
117       downloaded from Linux Kernel Archive
118       <https://www.kernel.org/pub/linux/utils/util-linux/>.
119
120
121
122util-linux 2.39.2                 2023-06-14                          LSMEM(1)
Impressum