Fasal_vk
Fasal_vk

Reputation: 3

Is there any way to know which processes are running on which core in QNX

My system is running with QNX6.5 and it has 4 cpu cores. But I don't know which and all processes are running in each core. Is there any way to know in detail. Thanks in advance

Upvotes: 0

Views: 2093

Answers (3)

pmod
pmod

Reputation: 10997

Processes typically run multiple threads (at least one - main thread); so the thread is actual running unit, not the process (and core affinity is settable per thread). Thus you'd need to know on which core(s) threads are running.

There is "%l" format option that tells you on what CPU particular thread is executing on:

# pidin -F "%b %50h %i %l" -p random 
tid thread name                                         cpu
  1 1                                                     0
    Runmask     : 0x0000007f
    Inherit Mask: 0x0000007f
  2 Timer Thread                                          1
    Runmask     : 0x0000007f
    Inherit Mask: 0x0000007f
  3 3                                                     6
    Runmask     : 0x0000007f
    Inherit Mask: 0x0000007f

Above we print thread id, thread name, run/inherit cpu masks and top right column is current cpu threads are running on, for the process called "random".

Upvotes: 1

Fasal_vk
Fasal_vk

Reputation: 3

Got the details by using below command. pidin rmasks

which will give "pid, tid, and name" of every threads. From the runmask value we can identify in which core it is running. For me thread details also fine.

Upvotes: 0

Will Miles
Will Miles

Reputation: 306

The best tooling for analyzing the details of process scheduling in QNX is the "System Analysis Toolkit", which uses the instrumentation features of the QNX kernel to provide a log of every scheduling event and message pass.

For QNX 6.5, the documentation can be found here: http://www.qnx.com/developers/docs/6.5.0SP1.update/index.html#./com.qnx.doc.instr_en_instr/about.html

Upvotes: 0

Related Questions