Questo contenuto non è disponibile nella lingua selezionata.

A.15. taskset


The taskset tool is provided by the util-linux package. It allows administrators to retrieve and set the processor affinity of a running process, or launch a process with a specified processor affinity.

Important

taskset does not guarantee local memory allocation. If you require the additional performance benefits of local memory allocation, Red Hat recommends using numactl instead of taskset.
To set the CPU affinity of a running process, run the following command:
Copy to Clipboard Toggle word wrap
# taskset -pc processors pid
Replace processors with a comma delimited list of processors or ranges of processors (for example, 1,3,5-7. Replace pid with the process identifier of the process that you want to reconfigure.
To launch a process with a specified affinity, run the following command:
Copy to Clipboard Toggle word wrap
# taskset -c processors -- application
Replace processors with a comma delimited list of processors or ranges of processors. Replace application with the command, options and arguments of the application you want to run.
For more information about taskset, see the man page:
Copy to Clipboard Toggle word wrap
$ man taskset
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat, Inc.