Sample Header Ad - 728x90

Get CPU core id executing a process which suddenly exits

0 votes
2 answers
417 views
In Linux, in a multi-core processor, ps , top and similar tools can show the CPU logical core id running a specific process. If the process runs for a certain amount of time, it's easy to identify it in the process list. I have instead a stand-alone program which prints "hello world" and the number of logical core detected from CPU assembly (RDPID instruction): $ ./hello_world hello world 1 $ It immediately ends. I would like to compare this number with the one provided by ps, top or similar. So, how to obtain the same information (the CPU logical core id) in this case? How to get the process information while this process is still executing?
Asked by BowPark (5155 rep)
May 9, 2023, 07:39 AM
Last activity: May 9, 2023, 09:03 AM