← 返回命令列表

Linux command

chmem 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Set a memory block offline

sudo chmem -b -d [block_number]

Set a memory block online

sudo chmem -b -e [block_number]

Set a memory range offline

sudo chmem -d 0x[start_address]-0x[end_address]

Set a memory range online

sudo chmem -e 0x[start_address]-0x[end_address]

Set memory online in a specific zone

sudo chmem -e 0x[start_address] -z [Movable]

说明

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.

参数

-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

FAQ

What is the chmem command used for?

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.

How do I run a basic chmem example?

Run `sudo chmem -b -d [block_number]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -b, --block do in chmem?

Operate on memory blocks by block number