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.
Command Line Options:
List each individual memory block, instead of combining memory blocks with similar attributes.
lsmem -a ...
Print the SIZE column in bytes rather than in a human-readable format.
lsmem -b ...
Display help text and exit.
lsmem -h ...
Use JSON output format.
lsmem -J ...
Do not print a header line.
lsmem -n ...
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 ...
Produce output in the form of key="value" pairs. All potentially unsafe characters are hex-escaped (\x<code>).
lsmem -P ...
Produce output in raw format. All potentially unsafe characters are hex-escaped (\x<code>).
lsmem -r ...
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 ...
Display version information and exit.
lsmem -V ...
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[ ...