Skip to main content

5.3.5 Assigning a CPU Core Resource to a Physical Partition


5.3.5 Assigning a CPU Core Resource to a Physical Partition
To assign a CPU core resource to a physical partition, execute the setcod command with interactive operation from the XSCF shell. You need to have the platadm privilege to execute this command.
XSCF> setcod [-p ppar_id] -s cpu
PROC Permits installed: XX cores
PROC Permits assigned for PPAR 0 (X MAX)
[Permanent Xcores]
Permanent [X]: permits
PROC Permits assigned for PPAR 1 (X MAX)
[Permanent Xcores]
Permanent [X]: permits
:
For -p ppar_id, specify the physical partition ID to which to assign the CPU core resource. If the permits operand is not specified, the command starts an interactive session for assigning the CPU core resource.
If the applied XSCF firmware is XCP 2260 or later, you can also execute the following command.
The permits value specifies the number of CPU Activations for CPU cores whose use is allowed.
CPU Activations can be specified in units of one CPU core.
XSCF> setcod [[-q] -{y|n}] -p ppar_id -s cpu -c {set|add|del} permits
Note - We do not recommend using the setcod command specified in the following way.

XSCF> setcod -p ppar_id -s cpu permits

To execute the setcod command when the XCP firmware is XCP 2260 or later, specify the -c option or use interactive operation. Also, use interactive operation for XCP 2250 or earlier.
The reasons are as follows.
- At command execution, no confirmation message ([y/n]) is output about implementing changes with the settings made.

- No warning message is output when the number of CPU Activation assignments for a running physical partition has been reduced. Any shortage in the number of CPU Activations, such as one due to permits being erroneously specified, may cause the system to stop.
You can specify with the setcod command up to the number of CPU Activations registered with the addcodactivation command.
Operation Procedure
  1. Log in to the XSCF with a user account that has the platadm privilege.
    For details, see "2.2 Logging In to the XSCF Shell."
  2. Assign a CPU core resource to a physical partition with the setcod command.
Note - To use -c set or not use the -c option, do not specify only the quantity to be added or deleted in the permits operand. Instead, specify the currently set quantity plus the number of added assignments, or specify the currently set quantity minus the number of deleted assignments. If you inadvertently specify only the quantity to be added/deleted, the number of CPU Activations may decrease, which may cause the system to stop.
  1. The following example assigns four CPU core resources to physical partition 1.
XSCF> setcod -p 1 -s cpu -c set 4
PROC Permits assigned for PPAR 1 : 0 -> 4

PROC Permits assigned for PPAR will be changed.
Continue? [y|n] :y

Completed.
  1. The following example shows CPU core resources being assigned interactively to a physical partition.
XSCF> setcod -s cpu
PROC Permits installed: 5 cores
PROC Permits assigned for PPAR 0 (5 MAX) [Permanent 2cores]
Permanent [2]:1
PROC Permits assigned for PPAR 1 (4 MAX) [Permanent 0cores]
Permanent [0]:4
PROC Permits assigned for PPAR 2 (0 MAX) [Permanent 0cores]
Permanent [0]:
PROC Permits assigned for PPAR 3 (0 MAX) [Permanent 0cores]
Permanent [0]:
PROC Permits assigned for PPAR 4 (0 MAX) [Permanent 0cores]
Permanent [0]:
PROC Permits assigned for PPAR 5 (0 MAX) [Permanent 0cores]
Permanent [0]:
PROC Permits assigned for PPAR 6 (0 MAX) [Permanent 0cores]
Permanent [0]:
PROC Permits assigned for PPAR 7 (0 MAX) [Permanent 0cores]
Permanent [0]:
PROC Permits assigned for PPAR 8 (0 MAX) [Permanent 0cores]
Permanent [0]:
PROC Permits assigned for PPAR 9 (0 MAX) [Permanent 0cores]
Permanent [0]:
PROC Permits assigned for PPAR 10 (0 MAX) [Permanent 0cores]
Permanent [0]:
PROC Permits assigned for PPAR 11 (0 MAX) [Permanent 0cores]
Permanent [0]:
PROC Permits assigned for PPAR 12 (0 MAX) [Permanent 0cores]
Permanent [0]:
PROC Permits assigned for PPAR 13 (0 MAX) [Permanent 0cores]
Permanent [0]:
PROC Permits assigned for PPAR 14 (0 MAX) [Permanent 0cores]
Permanent [0]:
PROC Permits assigned for PPAR 15 (0 MAX) [Permanent 0cores]
Permanent [0]:
  1. The following example adds two CPU core resources to physical partition 0.
XSCF> showcod -p 0
PROC Permits assigned for PPAR 0: 10
XSCF> setcod -p 0 -s cpu -c add 2
PROC Permits assigned for PPAR 0 : 10 -> 12

PROC Permits assigned for PPAR will be changed.
Continue? [y|n] :y

Completed.
XSCF> showcod -p 0
PROC Permits assigned for PPAR 0: 12
Note - With setcod -p 0 -s cpu -c set 12 specified, the command yields the same results.
Note - The XSCF firmware of version XCP 2250 or earlier does not support the -c add, -c delete, and -c set options. Specify the setcod command options as follows to interactively add and delete assignments.
XSCF> setcod -s cpu
  1. Execute the exit command to log out from the XSCF shell.
    If you do not have any further work with the XSCF shell, log out from the XSCF.