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 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 SIZE column in bytes rather than in a human-readable
50           format.
51
52       -h, --help
53           Display help text and exit.
54
55       -J, --json
56           Use JSON output format.
57
58       -n, --noheadings
59           Do not print a header line.
60
61       -o, --output list
62           Specify which output columns to print. Use --help to get a list of
63           all supported columns. The default list of columns may be extended
64           if list is specified in the format +list (e.g., lsmem -o +NODE).
65
66       --output-all
67           Output all available columns.
68
69       -P, --pairs
70           Produce output in the form of key="value" pairs. All potentially
71           unsafe value characters are hex-escaped (\x<code>).
72
73       -r, --raw
74           Produce output in raw format. All potentially unsafe characters are
75           hex-escaped (\x<code>).
76
77       -S, --split list
78           Specify which columns (attributes) use to split memory blocks to
79           ranges. The supported columns are STATE, REMOVABLE, NODE and ZONES,
80           or "none". The other columns are silently ignored. For more details
81           see DESCRIPTION above.
82
83       -s, --sysroot directory
84           Gather memory data for a Linux instance other than the instance
85           from which the lsmem command is issued. The specified directory is
86           the system root of the Linux instance to be inspected.
87
88       -V, --version
89           Display version information and exit.
90
91       --summary[=when]
92           This option controls summary lines output. The optional argument
93           when can be never, always or only. If the when argument is omitted,
94           it defaults to "only". The summary output is suppressed for --raw,
95           --pairs and --json.
96

AUTHORS

98       lsmem was originally written by Gerald Schaefer for s390-tools in Perl.
99       The C version for util-linux was written by Clemens von Mann, Heiko
100       Carstens and Karel Zak.
101

SEE ALSO

103       chmem(8)
104

REPORTING BUGS

106       For bug reports, use the issue tracker at
107       https://github.com/karelzak/util-linux/issues.
108

AVAILABILITY

110       The lsmem command is part of the util-linux package which can be
111       downloaded from Linux Kernel Archive
112       <https://www.kernel.org/pub/linux/utils/util-linux/>.
113
114
115
116util-linux 2.37.2                 2021-06-02                          LSMEM(1)
Impressum