Skip to content

Instantly share code, notes, and snippets.

@stevenwilliamson
Created June 3, 2016 15:15
Show Gist options
  • Select an option

  • Save stevenwilliamson/c65b860b6167bc01195f4b4e02546045 to your computer and use it in GitHub Desktop.

Select an option

Save stevenwilliamson/c65b860b6167bc01195f4b4e02546045 to your computer and use it in GitHub Desktop.
#!/usr/sbin/dtrace -s
syscall::read*:entry /fds[arg0].fi_fs == "zfs"/
{
self->start = timestamp;
}
syscall::read*:return / self->start /
{
@data["latency_aggregation"] = llquantize(timestamp - self->start, 10, 0, 6, 20);
self->start = 0;
}
tick-1s
{
printa(@data);
clear(@data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment