Changing the configuration state of CPUs
A CPU on an LPAR can be in configuration state configured
,
standby
, or reserved
. You can change the state of
standby
CPUs to configured
state and vice versa.
Before you begin
- You can change the configuration state of CPUs for Linux in LPAR mode only. For Linux on z/VM®, CPUs are always in a
configured
state. - Daemon processes like cpuplugd can change the state of any CPU at any time. Such changes can interfere with manual changes.
About this task
configured
state are brought online and used. The kernel does not detect CPUs in
reserved
state.Procedure
Issue a command of this form to change the configuration state of a CPU:
# chcpu -c|-g <N>
where- <N>
- is the number of the logical CPU.
- -c
- changes the configuration state of a CPU from
standby
toconfigured
. - -g
- changes the configuration state of a CPU from
configured
tostandby
. Only offline CPUs can be changed to thestandby
state.
Alternatively, you can write
1
to the configure sysfs
attribute of a CPU to set its configuration state to configured
, or
0
to change its configuration state to standby
.Examples:
- The following chcpu command changes the state of the logical CPU with number
2
fromstandby
toconfigured
:
The following command achieves the same results by writing# chcpu -c 2
1
to the configure sysfs attribute of the CPU.# echo 1 > /sys/devices/system/cpu/cpu2/configure
- The following chcpu command changes the state of the logical CPU with number
2
fromconfigured
tostandby
:
The following command achieves the same results by writing# chcpu -g 2
0
to the configure sysfs attribute of the CPU.# echo 0 > /sys/devices/system/cpu/cpu2/configure