May I ask which probes are turned on?

If that matters, I use Mac OS X, but I believe that this applies to the OS. If the answer is different for the OS, I would be interested to know about it.

Let's say that I open a terminal window, turn on some probes and start collecting data using DTrace.

In another terminal window, I can ask DTrace which probes were turned on? If so, how?

+4
source share
1 answer

I received the following information from Adam Leventhal on the DTrace mailing list. Firstly, he provided this script that runs on Solaris

#!/usr/sbin/dtrace -s #pragma D option quiet int i; tick-100 /i >= `dtrace_nprobes/ { exit(0); } tick-100 { printf("%4d %10s %20s %20s %10s %s\n", i, stringof(`dtrace_probes[i]->dtpr_provider->dtpv_name), stringof(`dtrace_probes[i]->dtpr_mod), stringof(`dtrace_probes[i]->dtpr_func), stringof(`dtrace_probes[i]->dtpr_name), `dtrace_probes[i]->dtpr_ecb != NULL ? "enabled" : "disabled"); i++ } 

Unfortunately, the same kernel variables are not available on Mac OS X due to an error.

+2
source

All Articles