LinuxCommandLibrary

chmem

configure memory hotplug state

TLDR

Set a memory block offline

$ sudo chmem -b -d [block_number]
copy
Set a memory block online
$ sudo chmem -b -e [block_number]
copy
Set a memory range offline using hexadecimal addresses
$ sudo chmem -d 0x[start_address]-0x[end_address]
copy
Set a memory range online using hexadecimal addresses
$ sudo chmem -e 0x[start_address]-0x[end_address]
copy
Set memory online and assign to a specific zone
$ sudo chmem -e 0x[start_address] -z [Movable]
copy

SYNOPSIS

chmem [options] size|range|block

DESCRIPTION

chmem modifies the state of memory blocks in a Linux system, bringing them online or offline. This is primarily used in virtualized environments for memory hotplug operations.
Memory blocks are chunks of physical memory that can be individually managed. The tool allows dynamic memory management without rebooting.

PARAMETERS

-b, --block

Operate on memory blocks by block number
-d, --disable
Set memory offline
-e, --enable
Set memory online
-z, --zone zone
Assign memory to a specific zone (DMA, DMA32, Normal, Movable)
-h, --help
Display help

CAVEATS

Requires root privileges. Not all systems support memory hotplug. Memory containing kernel data or in-use pages cannot be offlined. Virtual machines may require specific configuration to support memory hotplug.

SEE ALSO

lsmem(1), free(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community