Taskset
The taskset command is used to query or specify the CPU core on which the process is running by the corresponding PID.
- After OpenPLC runtime is started, run ‘
systemctl status openplc
’ to view the processes related to the OpenPLC runtime:Figure 1. Example Output - Then, run ‘
sudo taskset -pc x PID
’ to bind the ‘PID’ process to the core ‘x’, for example: run ‘sudo taskset -pc 3 3140’ to bind the main process ‘./core/openplc’ of OpenPLC runtime to core 3 and check it by running:sudo taskset -p 3140
:Figure 2. Example Output
Tip: Click this link to see more details.