Linux "chcpu" Command Line Options and Examples
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.
chcpu -c|-d|-e|-g cpu-list
chcpu -p mode
Command Line Options:
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 ...
Disable the specified CPUs. Disabling a CPU means that the kernel sets it offline.
chcpu -d ...
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 ...
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 ...
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 ...
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 ...
Display version information and exit.
chcpu -V ...
Display help text and exit.RETURN CODESchcpu has the following return codes:0 success1 failure64 partial successAUTHORHeiko Carstens ⟨firstname.lastname@example.org⟩COPYRIGHTCopyright IBM Corp. 2011
chcpu -h ...