Chris's Wiki :: blog/solaris/ZFSDTraceScripts Commentshttps://utcc.utoronto.ca/~cks/space/blog/solaris/ZFSDTraceScripts?atomcommentsDWiki2012-12-29T00:16:12ZRecent comments in Chris's Wiki :: blog/solaris/ZFSDTraceScripts.From 209.118.197.222 on /blog/solaris/ZFSDTraceScriptstag:CSpace:blog/solaris/ZFSDTraceScripts:fe3c93e5b64cbda5adddadaa7092a974c6fa8e3aFrom 209.118.197.222<div class="wikitext"><p>Monitoring similar stuff.
Here is a script that monitors latency, throughput and I/O request size of nfs,zfs and io broken down into reads and writes and writes into non-sync, sync and filesync and nfsreads broken onto cached reads and non-cached reads. Further nfs requests can be broken down into latency histograms and further into latency histograms by size.
Runs by default every second but that can be modified with a command line arg.</p>
<p><a href="https://github.com/khailey/ioh/blob/master/README.md">https://github.com/khailey/ioh/blob/master/README.md</a></p>
<p>can optionally take and IP arg if wanting to look at traffic to from a particular IP.</p>
<p>Simplest output looks like:</p>
<pre>
date: 1335282287 , 24/3/2012 15:44:47
TCP out: 8.107 MB/s, in: 5.239 MB/s, retrans: MB/s ip discards:
----------------
| MB/s| avg_ms| avg_sz_kb| count
------------|-----------|----------|----------|--------------------
R | io:| 0.005 | 24.01 | 4.899 | 1
R | zfs:| 7.916 | 0.05 | 7.947 | 1020
C | nfs_c:| | | | .
R | nfs:| 7.916 | 0.09 | 8.017 | 1011
-
W | io:| 9.921 | 11.26 | 32.562 | 312
W | zfssync:| 5.246 | 19.81 | 11.405 | 471
W | zfs:| 0.001 | 0.05 | 0.199 | 3
W | nfs:| | | | .
W |nfssyncD:| 5.215 | 19.94 | 11.410 | 468
W |nfssyncF:| 0.031 | 11.48 | 16.000 | 2
</pre>
<p>I haven't had a chance to look at your scripts yet. Skimmed the nfs one and bookmarked the github project to look into soon.</p>
<p>- Kyle Hailey</p>
<p><a href="http://dboptimizer.comm">http://dboptimizer.comm</a></p>
</div>2012-12-29T00:16:12ZBy Chris Siebenmann on /blog/solaris/ZFSDTraceScriptstag:CSpace:blog/solaris/ZFSDTraceScripts:f72835e2d8eb2fdb5eb2bd6f0fbba97a778d4478Chris Siebenmann<div class="wikitext"><p>Thank you for the comments, suggestions, and especially the bug report
about iscsi-long.d; you're right, it didn't clear <code>started[]</code> if the
iSCSI request wasn't a long one. I've fixed that and all of the other
issues (I believe) and the updated versions are now on Github.</p>
</div>2012-11-01T16:13:09ZFrom 67.188.160.90 on /blog/solaris/ZFSDTraceScriptstag:CSpace:blog/solaris/ZFSDTraceScripts:2b85269e775eba0a6db94a7280546b53e74aa4b0From 67.188.160.90<div class="wikitext"><p>Thanks for sharing! These are especially useful -- not just for direct usage -- but as an expression of useful ideas. Even if they don't run for other people, they show what can be done (after script updates to match kernel versions).</p>
<p>...</p>
<p>Some minor comments about comments: I'd add your name and blog post or github URL to the script headers - ZFS DTrace scripts are very popular, and I'm guessing these will get emailed around, so that should help people find the origin (and updates!). The level of comments is otherwise great - especially those explaining the reason for tracing zio functions. Note that one script has the "/* DTrace 1.0: no inet functions, no this->strings */" comment, but that comment was missed in others, and it is a pretty alarming piece of code worthy of a comment. :)</p>
<p>Does iscsi-long.d clear started[] if it isn't long? This looks like a very useful script BTW.</p>
<p>- Brendan</p>
</div>2012-11-01T06:26:20Z