|
NAME | SYNOPSIS | DESCRIPTION | OPTIONS | ENVIRONMENT | AUTHORS | SEE ALSO | REPORTING BUGS | AVAILABILITY |
|
|
|
LSMEM(1) User Commands LSMEM(1)
lsmem - list the ranges of available memory with their online
status
lsmem [options]
The lsmem command lists the ranges of available memory with their
online status. The listed memory blocks correspond to the memory
block representation in sysfs. The command also shows the size of
a single memory block and the total amounts of memory in online
and offline state.
The default output is compatible with the original implementation
from s390-tools, but it’s strongly recommended to avoid using
default outputs in your scripts. Always explicitly define expected
columns by using the --output option together with a columns list
in environments where a stable output is required.
The lsmem command always lists a new memory range when the current
memory block differs from the previous block by some output
column. This default behavior can be overridden with the --split
option (for example: lsmem --split=ZONES). The special word none
may be used with --split to ignore all differences between memory
blocks and to create contiguous ranges that are as large as
possible. The opposite semantics has --all, which lists all
individual memory blocks.
Note that some output columns may provide inaccurate information
if a splitting policy forces lsmem to ignore differences in some
attributes. For example, if you merge removable and non-removable
memory blocks into a single range, then the whole range will be
marked as non-removable in lsmem output.
The supported columns are RANGE, SIZE, STATE, REMOVABLE, BLOCK,
NODE, ZONES, CONFIGURED, and MEMMAP-ON-MEMORY.
RANGE
The start and end physical addresses of the memory
range.
SIZE
The size of the memory range, representing the total
amount of memory in that range.
STATE
The current online status of the memory range. Common
states include online, offline, and transitional
states.
REMOVABLE
Whether the memory is removable.
BLOCK
The specific memory block number or range.
NODE
The NUMA (Non-Uniform Memory Access) node to which
the memory block belongs.
ZONES
The memory zones to which the blocks belongs, such as
DMA, Normal, Movable.
CONFIGURED
The configuration state of a memory block. Refer to
chmem(8) for details on configuring or deconfiguring
memory blocks.
MEMMAP-ON-MEMORY
The memmap-on-memory state of the memory block at
configuration time. This setting indicates where
memory hotplug stores its internal metadata (the
struct pages array or memmap). If MEMMAP-ON-MEMORY is
set to 1, the metadata is allocated directly from the
newly added hotplugged memory, enabling hot-add
operations even when the system is under high memory
pressure. If set to 0, the memmap metadata is
allocated from existing system memory.
Not all columns are supported on all systems. If an unsupported
column is specified, lsmem prints the column but does not provide
any data for it. Additionally, lsmem may skip columns like
CONFIGURED or MEMMAP-ON-MEMORY if these states are not relevant to
the system’s architecture.
On systems that can configure/deconfigure memory, memory needs to
be configured before it can come online.
The "Memmap on memory parameter" summary line shows the global
memmap-on-memory setting for memory_hotplug. This is typically set
on the kernel command line via memory_hotplug.memmap_on_memory.
-a, --all
List each individual memory block, instead of combining memory
blocks with similar attributes.
-b, --bytes
Print sizes in bytes rather than in human-readable form.
By default, sizes are shown in units that are powers of 1024
bytes. The formal abbreviations for these units (KiB, MiB,
GiB, ...) are further shortened to just their first letter: K,
M, G, ....
-J, --json
Use JSON output format.
-n, --noheadings
Do not print a header line.
-o, --output list
Specify which output columns to print. Use --help to obtain a
list of all supported columns. To extend the default list of
columns specify list in the format +list. For example, lsmem
-o +NODE.
--output-all
Output all available columns.
-P, --pairs
Produce output in the form of key="value" pairs. All
potentially unsafe value characters are hex-escaped
(\x<code>).
-r, --raw
Produce output in raw format. All potentially unsafe
characters are hex-escaped (\x<code>).
-S, --split list
Specify which columns are used to split memory blocks into
ranges. The supported columns are STATE, REMOVABLE, NODE,
ZONES, CONFIGURED, MEMMAP-ON-MEMORY, and none. Other column
names are silently ignored. For more details see DESCRIPTION
above.
-s, --sysroot directory
Gather memory data for a Linux instance other than the
instance from which the lsmem command is issued. The specified
directory is the system root of the Linux instance to be
inspected.
--summary[=when]
This option controls summary lines output. The optional
argument when can be never, always or only. If the when
argument is omitted, it defaults to only. The summary output
is suppressed for --raw, --pairs, and --json.
--annotate[=when]
Adds an annotation to each column header name. Such an
annotation can be shown as a tooltip by terminals that support
this feature. The optional when argument can be always, never,
or auto. If the argument is omitted, it defaults to auto,
which means that annotations will only be used when the output
goes to a terminal.
-h, --help
Display help text and exit.
-V, --version
Display version and exit.
LIBSMARTCOLS_DEBUG=all
Enable libsmartcols debug output.
LIBSMARTCOLS_DEBUG_PADDING=on
Use visible padding characters.
LIBSMARTCOLS_JSON=compact|lines
Control JSON output format when using --json. Supported values
are compact for JSON output with minimal whitespace, and lines
for JSON Lines format (one JSON object per line). If unset or
set to any other value, pretty-printed JSON is used.
LSMEM_COLUMNS
Specify a comma-separated list of output columns to print. All
columns listed in --help can be used.
ULPATH_DEBUG=all
Enable path debug output.
lsmem was originally written by Gerald Schaefer for s390-tools in
Perl. The C version for util-linux was written by Clemens von
Mann, Heiko Carstens and Karel Zak.
chmem(8)
For bug reports, use the issue tracker
<https://github.com/util-linux/util-linux/issues>.
The lsmem command is part of the util-linux package which can be
downloaded from Linux Kernel Archive
<https://www.kernel.org/pub/linux/utils/util-linux/>. This page is
part of the util-linux (a random collection of Linux utilities)
project. Information about the project can be found at
⟨https://www.kernel.org/pub/linux/utils/util-linux/⟩. If you have a
bug report for this manual page, send it to
util-linux@vger.kernel.org. This page was obtained from the
project's upstream Git repository
⟨git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git⟩ on
2026-05-24. (At that time, the date of the most recent commit that
was found in the repository was 2026-05-20.) If you discover any
rendering problems in this HTML version of the page, or you
believe there is a better or more up-to-date source for the page,
or you have corrections or improvements to the information in this
COLOPHON (which is not part of the original manual page), send a
mail to man-pages@man7.org
util-linux 2.43.devel-739-eee2e 2026-05-24 LSMEM(1)
Pages that refer to this page: chmem(8)