1 | initial version |
You can use taskset
But read what it says: "Note that the Linux scheduler also supports natural CPU affinity: the scheduler attempts to keep processes on the same CPU as long as practical for performance reasons"
This means that you don't have to do anything. Just launch 4 scripts on 1 pc and 2 scripts on the other and the kernel will set the affinity as required.