Skip to content

Instantly share code, notes, and snippets.

@szaydel
Created February 3, 2014 20:48
Show Gist options
  • Save szaydel/8792078 to your computer and use it in GitHub Desktop.
Save szaydel/8792078 to your computer and use it in GitHub Desktop.
Dtrace script that shows aging of data in the ARC.
#!/usr/sbin/dtrace -s
#pragma D option quiet
dtrace:::BEGIN
{
printf("lbolt rate is %d Hertz.\n", `hz);
printf("Tracing lbolts between ARC accesses...");
}
fbt::arc_access:entry
{
self->ab = args[0];
self->lbolt = args[0]->b_arc_access;
}
fbt::arc_access:return /self->lbolt/
{
@ = quantize(self->ab->b_arc_access - self->lbolt);
self->ab = 0;
self->lbolt = 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment