chmem
(8)configure memory
Options
7-b--blocksUse a BLOCKRANGE parameter instead of RANGE or SIZE for the --enable and --disable options.
-d--disableSet the specified RANGE, SIZE, or BLOCKRANGE of memory offline.
-e--enableSet the specified RANGE, SIZE, or BLOCKRANGE of memory online.
-z--zoneSelect the memory ZONE where to set the specified RANGE, SIZE, or BLOCKRANGE of memory online or offline. By default, memory will be set online to the zone Movable, if possible.
-v--verboseVerbose mode. Causes chmem to print debugging messages about its progress.
-h--helpDisplay help text and exit.
-V--versionDisplay version and exit.
DESCRIPTION
The chmem command sets a particular size or range of memory online or offline.
SIZE and RANGE must be aligned to the Linux memory block size, as shown in the output of the lsmem(1) command.
Setting memory online can fail for various reasons. On virtualized systems it can fail if the hypervisor does not have enough memory left, for example because memory was overcommitted. Setting memory offline can fail if Linux cannot free the memory. If only part of the requested memory can be set online or offline, a message tells you how much memory was set online or offline instead of the requested amount.
When setting memory online chmem starts with the lowest memory block numbers. When setting memory offline chmem starts with the highest memory block numbers.
EXIT STATUS
EXAMPLE
chmem --enable 1024
chmem -e 2g
chmem --disable 0x00000000e4000000-0x00000000f3ffffff
chmem -b -d 10
REPORTING BUGS
For bug reports, use the issue tracker https://github.com/util-linux/util-linux/issues.
AVAILABILITY
The chmem 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/.