Linux "lsmem" Command Line Options and Examples
list the ranges of available memory with their online status

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 memory block size and the amount of memory in online and offline state.


Usage:

lsmem [options]




Command Line Options:

-a
List each individual memory block, instead of combining memory blocks with similar attributes.
lsmem -a ...
-b
Print the SIZE column in bytes rather than in a human-readable format.
lsmem -b ...
-h
Display help text and exit.
lsmem -h ...
-J
Use JSON output format.
lsmem -J ...
-n
Do not print a header line.
lsmem -n ...
-o
Specify which output columns to print. Use --help to get a list of all supported columns. The default list of columns may beextended if list is specified in the format +list (e.g. lsmem -o +NODE).
lsmem -o ...
-P
Produce output in the form of key="value" pairs. All potentially unsafe characters are hex-escaped (\x<code>).
lsmem -P ...
-r
Produce output in raw format. All potentially unsafe characters are hex-escaped (\x<code>).
lsmem -r ...
-s
Gather memory data for a Linux instance other than the instance from which the lsmem command is issued. The specified direc‐tory is the system root of the Linux instance to be inspected.
lsmem -s ...
-V
Display version information and exit.
lsmem -V ...
--summary[
This option controls summary lines output. The optional argument when can be never, always or only. If the when argument isomitted, it defaults to "only". The summary output is suppresed for --raw, --pairs and --json.AUTHORlsmem 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.
lsmem --summary[ ...