System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get cpu id per thread when specified threads in a process is bound various cpus.

sophia007
Occasional Visitor

How to get cpu id per thread when specified threads in a process is bound various cpus.

For instance, case of AIX

# ps -mo THREAD -p 4850146
    USER      PID     PPID       TID ST  CP PRI SC    WCHAN        F     TT BND COMMAND
    altibase  4850146        1         - A   54  60 126        *    40001      -  23 /altibase/altibase_home/bin/altibase -p boot from a
       -        -        -   5243335 S    0  60  1        -   418400      -  23 -
       -        -        -   6554011 S    0  60  1        -   410400      -  23 -
       -        -        -   7143851 S    0  60  1 f1000f0a10086d40  8410400      -  23 -
       -        -        -   7405863 S    0  60  1 f1000f0a10087140  8410400      -  23 -

As seeing above, I can know cpu id that is bound, per thread with "ps" command and some option.

But I could not find any command that is same function in HP-UX.

I'd like to know cpu id that is bound per thread.

Thank you.

1 REPLY
Dennis Handly
Acclaimed Contributor

Re: How to get CPU id per thread when specified threads in a process is bound various CPUs.

HP-UX doesn't support Linux's -L option.

Why are looking for thread info?

You may have to use glance or write a program using pstat(2).