Which process runs on which CPU?
Ø You can use below command to detect which process runs on which CPU.
Running below command n times for PID 675
will give 2 different results listed below.
2 different result is not problematic because those numbers are in fact thread
numbers and those 2 threads are belong to same core id at below lscpu command output, lscpu command
proves us that Hyperthreading is enabled on this sample system.
[server1]~#ps -mo pid,tid,fname,user,%cpu,psr -p 675
PID TID COMMAND USER %CPU PSR
675 - oracle oracle 0.0 -
- 675 - oracle 0.0 8
[server1]~#ps -mo pid,tid,fname,user,%cpu,psr -p 675
PID TID COMMAND USER %CPU PSR
675 - oracle oracle 0.0 -
- 675 - oracle 0.0 20
[server1]~#
lscpu command Shows thread-core details
[server1]/#lscpu -ae
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE
0 0 0 0 0:0:0:0 yes
1 0 0 1 1:1:1:0 yes
2 0 0 2 2:2:2:0 yes
3 0 0 3 3:3:3:0 yes
4 0 0 4 4:4:4:0 yes
5 0 0 5 5:5:5:0 yes
6 0 1 6 6:6:6:1 yes
7 0 1 7 7:7:7:1 yes
8
0 1 8
8:8:8:1 yes
9 0 1 9 9:9:9:1 yes
10 0 1 10 10:10:10:1 yes
11 0 1 11 11:11:11:1 yes
12 0 0 0 0:0:0:0 yes
13 0 0 1 1:1:1:0 yes
14 0 0 2 2:2:2:0 yes
15 0 0 3 3:3:3:0 yes
16 0 0 4 4:4:4:0 yes
17 0 0 5 5:5:5:0 yes
18 0 1 6 6:6:6:1 yes
19 0 1 7 7:7:7:1 yes
20
0 1 8
8:8:8:1 yes
21 0 1 9 9:9:9:1 yes
22 0 1 10 10:10:10:1 yes
23 0 1 11 11:11:11:1 yes
[server1]/#
Please feel free to
communicate by bulent.yucesoy@gmail.com