Linux "chmem" Command Line Options and Examples
configure memory

The chmem command sets a particular size or range of memory online or offline. ‐ Specify SIZE as <size>[m|M|g|G]. With m or M, <size> specifies the memory size in MiB (1024 x 1024 bytes).


Usage:

chmem [-h] [-V] [-v] [-e|-d] [SIZE|RANGE|-b BLOCKRANGE] [-z ZONE]




Command Line Options:

-b
Use a BLOCKRANGE parameter instead of RANGE or SIZE for the --enable and --disable options.
chmem -b ...
-d
Set the specified RANGE, SIZE, or BLOCKRANGE of memory offline.
chmem -d ...
-e
Set the specified RANGE, SIZE, or BLOCKRANGE of memory online.
chmem -e ...
-z
Select the memory ZONE where to set the specified RANGE, SIZE, or BLOCKRANGE of memory online or offline. By default, memorywill be set online to the zone Movable, if possible.
chmem -z ...
-h
Print a short help text, then exit.
chmem -h ...
-v
Verbose mode. Causes chmem to print debugging messages about it's progress.
chmem -v ...
-V
Print the version number, then exit.RETURN CODESchmem has the following return codes:0 success1 failure64 partial successEXAMPLESchmem --enable 1024This command requests 1024 MiB of memory to be set online.chmem -e 2gThis command requests 2 GiB of memory to be set online.chmem --disable 0x00000000e4000000-0x00000000f3ffffffThis command requests the memory range starting with 0x00000000e4000000 and ending with 0x00000000f3ffffff to be set offline.chmem -b -d 10This command requests the memory block number 10 to be set offline.
chmem -V ...