Created
September 5, 2022 17:52
-
-
Save szaydel/effc91220805fb4cba9864e7e36cf147 to your computer and use it in GitHub Desktop.
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 -Cs | |
#pragma D option quiet | |
#define NSECS_IN_MSEC 1000000 | |
:zfs:dmu_tx_wait:entry { | |
self->in = timestamp; | |
self->spa = (string)((char *)args[0]->tx_pool->dp_spa->spa_name); | |
} | |
:zfs:dmu_tx_wait:return /self->in/ { | |
this->delta = timestamp - self->in; | |
@q[self->spa] = quantize(this->delta); | |
@max_delay[self->spa] = max(this->delta); | |
self->in = 0; self->spa = 0; | |
} | |
tick-5sec { | |
normalize(@max_delay, NSECS_IN_MSEC); /* convert nano to milliseconds */ | |
printa("\t(%s) max delay: %@d(mS)%@d\n", @max_delay, @q); | |
trunc(@q); trunc(@max_delay); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment