mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 01:02:09 +02:00
taskset: add page (#2942)
This commit is contained in:
parent
39ebeba5d0
commit
322519512b
1 changed files with 23 additions and 0 deletions
23
pages/linux/taskset.md
Normal file
23
pages/linux/taskset.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
# taskset
|
||||
|
||||
> Get or set a process' CPU affinity or start a new process with a defined CPU affinity.
|
||||
|
||||
- Get a running process' CPU affinity by PID:
|
||||
|
||||
`taskset --pid --cpu-list {{pid}}`
|
||||
|
||||
- Set a running process' CPU affinity by PID:
|
||||
|
||||
`taskset --pid --cpu-list {{cpu_id}} {{pid}}`
|
||||
|
||||
- Start a new process with affinity for a single CPU:
|
||||
|
||||
`taskset --cpu-list {{cpu_id}} {{command}}`
|
||||
|
||||
- Start a new process with affinity for multiple non-sequential CPUs:
|
||||
|
||||
`taskset --cpu-list {{cpu_id_1}} {{cpu_id_2}} {{cpu_id_3}}`
|
||||
|
||||
- Start a new process with affinity for CPUs 1 through 4:
|
||||
|
||||
`taskset --cpu-list {{cpu_id_1}},{{cpu_id_4}}`
|
Loading…
Add table
Reference in a new issue