affinity program
Use affinity program to set the affinity of one process to another process.
Use undo affinity program to remove the configuration.
Syntax
affinity program program-name { attract strength | default | none | repulse strength }
undo affinity program program-name
Default
No process affinity is set for any process.
Views
Placement process view
Predefined user roles
network-admin
Parameters
program-name: Specifies the name of a process, a case-insensitive string of 1 to 15 characters. You can use the display placement program all command to view information about placeable processes.
attract strength: Sets a positive affinity in the range of 1 to 100000. The higher the value, the stronger the preference for the current process to run on the same location as the specified process.
default: Sets the affinity to the default, a positive affinity of 200.
none: Sets the affinity to 0, which means the active process has no preference for any other process and the system determines its location.
repulse strength: Sets a negative affinity in the range of 1 to 100000. The higher the value, the weaker the preference for the current process to run on the same location as the specified process.
Usage guidelines
Use this command to have processes run on the same location or different locations.
Examples
# Configure a negative affinity of 200 for OSPF to run on the same location as BGP.
<Sysname> system-view [Sysname] placement program ospf [Sysname-program-ospf] affinity program bgp repulse 200
Related commands
affinity location-set
affinity location-type