Skip to content

Instantly share code, notes, and snippets.

@videlalvaro
Created September 15, 2011 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save videlalvaro/1219266 to your computer and use it in GitHub Desktop.
Save videlalvaro/1219266 to your computer and use it in GitHub Desktop.
rabbitmq routing probes
erlang$target:::function-entry
/copyinstr(arg1) == "rabbit_exchange_type_direct:route/2"/
{
printf("%s %s", probemod, probefunc);
self->traceIt = 1;
}
erlang$target:::function-entry
/self->traceIt/
{
printf("%s", copyinstr(arg1));
}
syscall:::entry
/self->traceIt/
{
printf("%s %s", probemod, probefunc);
}
erlang$target:::function-return
{
self->traceIt = 0;
}
@videlalvaro
Copy link
Author

run it like this: sudo dtrace -s route.d -p pgrep beam.smp

This only works with this OTP fork: https://github.com/dustin/otp/wiki/DTrace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment