/ Published in: Bash

Start jobs bound to certain CPU(s), or find the number of available CPUs.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# Bit mask of all CPUs: (affinity mask of init process) taskset -p 1 # CPUs allowed for this shell: taskset -p $$ # Start job with given CPU mask: taskset mask command # Get / Set CPU mask of running command: taskset -p `pidof command` taskset -p newmask `pidof command`
Comments
