Hi Qihua Wu,

Here is a script that shows process args for process that was interrupted, and cpu. It is easily modified
to add pid.

#!/usr/sbin/dtrace -s

interrupt-start
{
   self->intr = curthread->t_intr;
}

interrupt-start
/self->intr/
{
   @[stringof(self->intr->t_procp->p_user.u_psargs), cpu] = count();
}

interrupt-complete
/self->intr/
{
   self->intr = 0;
}


max

Qihua Wu wrote:
So do we have a way to know what causes the interrupt (this may be got by
intrstat) and which pid/execname is interrupted?

Thanks
Daniel

On Thu, Jan 21, 2010 at 10:43 PM, Jim Mauro <james.ma...@sun.com> wrote:

"sched" is the execname of the PID 0 process (run "ps -e").

The string "sched" gets plugged into the DTrace execname variable
if the CPU is in an interrupt handler when a probe fires.

CPU 0 is very likely taking the clock interrupts, which by default
occur every 10 milliseconds.

HTH,
/jim




Qihua Wu wrote:

Why sched is often interrupt on cpu 0 instead of distribution evenly on
all cpu?

dtrace -n 'sdt:::interrupt-start { @num[execname,cpu] = count(); }'
dtrace: description 'sdt:::interrupt-start ' matched 1 probe
^C

 sched                                                     4
 355
 sched                                                    18
 358
 sched                                                     8
 369
 sched                                                    10
 370
 sched                                                    11
 370
 sched                                                    12
 408
 sched                                                    13
 408
 sched                                                    15
 408
 sched                                                    19
 408
 sched                                                    20
 408
 sched                                                    21
 408
 sched                                                    22
 408
 sched                                                    23
 408
 sched                                                    14
 409
 sched                                                     9
 410
 sched                                                     2
 411
 sched                                                    16
 411
 sched                                                     6
 422
 sched                                                    17
 456
 sched                                                     3
 469
 sched                                                     5
 510
 sched                                                     7
 564
 sched                                                     1
3079
 sched                                                     0
535071

Thanks,
Daniel
------------------------------------------------------------------------

_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org



------------------------------------------------------------------------

_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to