Operating System - HP-UX
1748019 Members
4647 Online
108757 Solutions
New Discussion

CPU on which a process runs

 
SOLVED
Go to solution
Dennis Handly
Acclaimed Contributor

Re: CPU on which a process runs

You may be able to get the CPU by calling pstat_getlwp(2). There are fields lwp_pid, lwp_spu and lwp_bind_spu in lwp_status.
Also:
lwp_nvcsw; # voluntary context switches
lwp_nivcsw; # involuntary context switches