Created
September 19, 2011 00:35
-
-
Save Knio/1225763 to your computer and use it in GitHub Desktop.
DTrace acceses to ZFS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/sbin/dtrace -s | |
# pragma D option quiet | |
zfs_write:entry, | |
zfs_read:entry, | |
zfs_putpage:entry, | |
zfs_getpage:entry | |
{ | |
self->ts = timestamp; | |
self->filepath = args[0]->v_path; | |
} | |
zfs_write:return, | |
zfs_read:return, | |
zfs_putpage:return, | |
zfs_getpage:return | |
/self->ts && self->filepath/ | |
{ | |
printf("%15s on %-80s took %12d ms\n", probefunc, | |
stringof(self->filepath), (timestamp - self->ts) / 1000); | |
@["time"] = quantize((timestamp - self->ts) / 1000); | |
self->ts = 0; | |
self->filepath = 0; | |
} | |
tick-10sec | |
{ | |
printa(@); | |
clear(@); | |
trunc(@,0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment