Linux "chcpu" Command Line Options and Examples
configure CPUs

chcpu can modify the state of CPUs. It can enable or disable CPUs, scan for new CPUs, change the CPU dispatching mode of the under‐ lying hypervisor, and request CPUs from the hypervisor (configure) or return CPUs to the hypervisor (deconfigure). Some options have a cpu-list argument.


Usage:

chcpu -c|-d|-e|-g cpu-list
    chcpu -p mode
    chcpu -r|-h|-V




Command Line Options:

-c
Configure the specified CPUs. Configuring a CPU means that the hypervisor takes a CPU from the CPU pool and assigns it to thevirtual hardware on which your kernel runs.
chcpu -c ...
-d
Disable the specified CPUs. Disabling a CPU means that the kernel sets it offline.
chcpu -d ...
-e
Enable the specified CPUs. Enabling a CPU means that the kernel sets it online. A CPU must be configured, see -c, before itcan be enabled.
chcpu -e ...
-g
Deconfigure the specified CPUs. Deconfiguring a CPU means that the hypervisor removes the CPU from the virtual hardware onwhich the Linux instance runs and returns it to the CPU pool. A CPU must be offline, see -d, before it can be deconfigured.
chcpu -g ...
-p
Set the CPU dispatching mode (polarization). This option has an effect only if your hardware architecture and hypervisor sup‐port CPU polarization. Available modes are:horizontal The workload is spread across all available CPUs.vertical The workload is concentrated on few CPUs.
chcpu -p ...
-r
Trigger a rescan of CPUs. After a rescan, the Linux kernel recognizes the new CPUs. Use this option on systems that do notautomatically detect newly attached CPUs.
chcpu -r ...
-V
Display version information and exit.
chcpu -V ...
-h
Display help text and exit.RETURN CODESchcpu has the following return codes:0 success1 failure64 partial successAUTHORHeiko Carstens ⟨heiko.carstens@de.ibm.com⟩COPYRIGHTCopyright IBM Corp. 2011
chcpu -h ...