Getting Started

Common Options

Command Alternavite Meaning
-a --all-tasks Set or retrieve the CPU affinity of all the task (threads) for a given PID.
-c --cpu-list Interpret mask as numerical list of processors instead of a bitmask.Numbers are separated by commas and may include ranges. For example: 0,5,8-11
-p --pid Operate on an existing PID and do not launch a new task.
-h --help Display help text and exit.
-v --version Print version and exit.

Usage

The default behavior is to run a new command with a given affinity mask

$ taskset [mask] [command] [arguments]

#Usage #2

$ taskset -p [pid]

$ taskset -p [mask] [pid]

You can also retrieve the CPU affinity of an existing task

Comments