DTrace on Solaris and Mac
Wednesday Jan 02, 2008
Well I have recently started with learning DTrace. DTrace is one of the most talked about feature in Solaris. This is how this feature is defined at OpenSolaris.org:
DTrace is a comprehensive dynamic tracing framework for the Solaris™ Operating Environment. DTrace provides a powerful infrastructure to permit administrators, developers, and service personnel to concisely answer arbitrary questions about the behavior of the operating system and user programs.
Apple has also introduced DTrace in its new operating system Mac OS 10.5 (Leopard). This is how it is described at apple.com/macosx:
DTrace is a low-level debugging and profiling facility for detailed monitoring of virtually any aspect of an application. Based on the Solaris Open Source project, this technology has been integrated by Apple into the Darwin kernel. In addition, Java, Ruby, Python, and Perl have been extended to support DTrace, providing unprecedented access for monitoring the performance characteristics of those languages.
Thus while learning DTrace I tried to compare both of them. Of course to use DTrace you need root privileges on the shell.
Here are the two screenshots (one on each os) with the most basic commands:
Solaris:
Mac OS 10.5:
So its quite evident that Solaris is far ahead with as many as 84997 (in build 72) probes as against 23300 in Leopard.










