Forrest logo
back to the taskset tool

taskset:tldr:db8b0

taskset: Start a new process with affinity for multiple non-sequential CPUs.
$ taskset --cpu-list ${cpu_id_1},${cpu_id_2},${cpu_id_3}
try on your machine

This command is used to set the CPU affinity for a process or task in a Linux-based system. Here is a breakdown of the command and its components: - taskset: This is the command itself, used to set the CPU affinity.

  • --cpu-list: This option specifies a list of CPU cores to which the process or task should be bound.
  • ${cpu_id_1},${cpu_id_2},${cpu_id_3}: These are placeholders for specific CPU core IDs or numbers, separated by commas. You would replace them with the actual CPU core IDs you want to assign to the task or process. For example, if you want to set the CPU affinity for a task to cores 1, 3, and 5, you would run the command like this: ``` taskset --cpu-list 1,3,5
This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the taskset tool