affinity location-type

Use affinity location-type to set the affinity of a process to a location type.

Use undo affinity location-type to restore the default.

Syntax

affinity location-type { current | paired | primary } { attract strength | default | none | repulse strength }

undo affinity location-type { current | paired | primary }

Default

No location type affinity is set for any process.

Views

Placement process view

Predefined user roles

network-admin

Parameters

current: Specifies the affinity to the current location. You can use the display placement program command to view the current location of a process.

paired: Specifies the affinity to the location of a standby process.

primary: Specifies the affinity to the master device.

attract strength: Sets a positive affinity in the range of 1 to 100000. The higher the value, the stronger the preference of the process to run on the specified location type.

default: Sets the affinity to the default, a positive affinity of 200.

none: Sets the affinity to 0.

repulse strength: Sets a negative affinity in the range of 1 to 100000. The higher the value, the weaker the preference for the process to run on the specified location type.

Examples

# Specify a positive affinity of 500 to the current location for BGP.

<Sysname> system-view
[Sysname] placement program bgp
[Sysname-program-bgp] affinity location-type current attract 500

Related commands