Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What awesome tips and tricks have you seen or done with Dtrace?


locked by HopelessN00b Dec 5 '14 at 5:46

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

I once used it to detect memory leaks in a live server application. I set probes for all malloc and free calls. The malloc probe was set to report the return value from the function and the free was set to report the first argument (which gave me the memory address of each). After allowing the probes to run for a bit I wrote a little bit of perl to find any malloc memory addresses that didn't have a free and reporting the program function and offset of the malloc call. Whole thing took about 20-30 minutes to find a serious memory leek.

Alternatives to this would be commercial packages like Purify. But that's not always an option especially on a live system.


I saw a SUN guy trace utiliziation of NFS share down to user and which file was used and all kinds of statistics at around this.

OpenSolaris 10 is awesome


Not the answer you're looking for? Browse other questions tagged or ask your own question.