[dtrace-discuss] What am I missing in the dtrace script?
Brian D. Horn
Brian.Horn at sun.com
Tue Jul 10 15:27:46 PDT 2007
I've asked around, I tried searching on-line, but no go.
I would think what I am seeing is impossible or that there must
be a bug in dtrace on MP systems (at least on 64-bit amd systems)
as this was run on a Sun Fire x4500 (4-way Opteron - aka "Thumper")
Here is the script:
#! /usr/sbin/dtrace -s
BEGIN
{
total_queued = 0;
queuing_failed = 0;
queuing_succeeded = 0;
}
::vdev_queue_io_to_issue:return
{
++total_queued;
}
::vdev_queue_io_to_issue:return
/ args[1] == 0 /
{
++queuing_failed;
}
::vdev_queue_io_to_issue:return
/ args[1] != 0 /
{
++queuing_succeeded;
}
END
{
printf("\nTotal %d succeeded %d failed %d\n",
total_queued, queuing_succeeded, queuing_failed);
}
And below is the output:
^C
CPU ID FUNCTION:NAME
3 2 :END
Total 970818 succeeded 485824 failed 485584
Note that:
# bc
485824+485584
971408
So the sum of the two cases with qualifiers do not sum
to the the total. I've seen this before and running the script
with all but one CPU off line seems to "fix" the problem.
With all but one processor off line:
^C
CPU ID FUNCTION:NAME
0 2 :END
Total 959314 succeeded 479657 failed 479657
# bc
479657+479657
959314
It is also suspect that "succeeded" and "failed" have
the exact same value, but I haven't analyzed that.
Is it a known issue that probes might be double counted or
missed on MP systems? Am I crazy? Am I trying to do
something that dtrace doesn't really support?
--
This message posted from opensolaris.org
More information about the dtrace-discuss
mailing list