Scroll to navigation

CHMEM(8) System Manager's Manual CHMEM(8)

NAME

chmem - set memory online or offline.

SYNOPSIS

chmem OPTIONS [SIZE|RANGE]

DESCRIPTION

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 MB (1024 x 1024 bytes). With g or G, <size> specifies the memory size in GB (1024 x 1024 x 1024 bytes). The default unit is MB.
Specify RANGE in the form 0x<start>-0x<end> as shown in the output of the lsmem command. <start> is the hexadecimal address of the first byte and <end> is the hexadecimal address of the last byte in the memory range.

SIZE and RANGE must be aligned to the Linux memory block size, as shown in the output of the lsmem command.

Setting memory online 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.

OPTIONS

-h, --help
Print a short help text, then exit.
-v, --version
Print the version number, then exit.
-e, --enable
Set the given RANGE or SIZE of memory online.
-d, --disable
Set the given RANGE or SIZE of memory offline.

EXAMPLES

chmem --enable 1024
This command requests 1024 MB of memory to be set online.
chmem -e 2g
This command requests 2 GB of memory to be set online.
chmem --disable 0x00000000e4000000-0x00000000f3ffffff
This command requests the memory range starting with 0x00000000e4000000 and ending with 0x00000000f3ffffff to be set offline.

SEE ALSO

lsmem(8)
Apr 2010 s390-tools