<div dir="ltr">Folks, <div><br></div><div>I've been trying to figure out what the disk.disk_time metrics mean for collectd (5.2.1) running on a solaris 10 box. It appears that the values are pulled directly from kstat and not munged in any way (from disk.c):</div>
<div><br></div><div><div><font face="courier new, monospace">#elif HAVE_LIBKSTAT</font></div><div><font face="courier new, monospace"># if HAVE_KSTAT_IO_T_WRITES && HAVE_KSTAT_IO_T_NWRITES && HAVE_KSTAT_IO_T_WTIME</font></div>
<div><font face="courier new, monospace"># define KIO_ROCTETS reads</font></div><div><font face="courier new, monospace"># define KIO_WOCTETS writes</font></div><div><font face="courier new, monospace"># define KIO_ROPS nreads</font></div>
<div><font face="courier new, monospace"># define KIO_WOPS nwrites</font></div><div><font face="courier new, monospace"># define KIO_RTIME rtime</font></div><div><font face="courier new, monospace"># define KIO_WTIME wtime</font></div>
<div><font face="courier new, monospace"># elif HAVE_KSTAT_IO_T_NWRITTEN && HAVE_KSTAT_IO_T_WRITES && HAVE_KSTAT_IO_T_WTIME</font></div><div><font face="courier new, monospace"># define KIO_ROCTETS nread</font></div>
<div><font face="courier new, monospace"># define KIO_WOCTETS nwritten</font></div><div><font face="courier new, monospace"># define KIO_ROPS reads</font></div><div><font face="courier new, monospace"># define KIO_WOPS writes</font></div>
<div><font face="courier new, monospace"># define KIO_RTIME rtime</font></div><div><font face="courier new, monospace"># define KIO_WTIME wtime</font></div><div><font face="courier new, monospace"># else</font></div>
<div><font face="courier new, monospace"># error "kstat_io_t does not have the required members"</font></div><div><font face="courier new, monospace"># endif</font></div><div><font face="courier new, monospace"> static kstat_io_t kio;</font></div>
<div><font face="courier new, monospace"> int i;</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"> if (kc == NULL)</font></div><div><font face="courier new, monospace"> return (-1);</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"> for (i = 0; i < numdisk; i++)</font></div><div><font face="courier new, monospace"> {</font></div><div>
<font face="courier new, monospace"> if (kstat_read (kc, ksp[i], &kio) == -1)</font></div>
<div><font face="courier new, monospace"> continue;</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"> if (strncmp (ksp[i]->ks_class, "disk", 4) == 0)</font></div>
<div><div><font face="courier new, monospace"> disk_submit (ksp[i]->ks_name, "disk_octets",</font></div><div><font face="courier new, monospace"> kio.KIO_ROCTETS, kio.KIO_WOCTETS);</font></div>
<div><font face="courier new, monospace"> disk_submit (ksp[i]->ks_name, "disk_ops",</font></div><div><font face="courier new, monospace"> kio.KIO_ROPS, kio.KIO_WOPS);</font></div>
<div><font face="courier new, monospace"> /* FIXME: Convert this to microseconds if necessary */</font></div><div><font face="courier new, monospace"> disk_submit (ksp[i]->ks_name, "disk_time",</font></div>
<div><font face="courier new, monospace"> kio.KIO_RTIME, kio.KIO_WTIME);</font></div><div><font face="courier new, monospace"> }</font></div><div><font face="courier new, monospace"> else if (strncmp (ksp[i]->ks_class, "partition", 9) == 0)</font></div>
<div><font face="courier new, monospace"> {</font></div><div><font face="courier new, monospace"> disk_submit (ksp[i]->ks_name, "disk_octets",</font></div><div><font face="courier new, monospace"> kio.KIO_ROCTETS, kio.KIO_WOCTETS);</font></div>
<div><font face="courier new, monospace"> disk_submit (ksp[i]->ks_name, "disk_ops",</font></div><div><font face="courier new, monospace"> kio.KIO_ROPS, kio.KIO_WOPS);</font></div>
<div><font face="courier new, monospace"> }</font></div><div><font face="courier new, monospace"> }</font></div><div><font face="courier new, monospace">/* #endif defined(HAVE_LIBKSTAT) */</font></div>
</div><div><br></div><div style>If this is true then the disk_time.read and disk_time.write are mislabeled for solaris. According to the kstat(KSTAT3) manpage rtime is the run (service) time and wtime is the wait time, not read- and write-times. Am I interpreting this correctly?</div>
<div style><br></div><div style>Thanks, </div><div style><br></div><div><div>---</div><div><a href="https://www.vizify.com/es/501a727aba8a2200020003b3" target="_blank">See my vizify bio!<br><img src="https://d3p70yap1armsy.cloudfront.net/fetch?url=https%3A%2F%2Fwww.vizify.com%2Fvizumes%2Fspecial%2F501a727aba8a2200020003b3%2Femail-signature&mode=emailsig&_t=1346838173268" border="0" alt="William Gunter's Visual Thumbprint" style="border: 2px solid white;"></a></div>
<div><a href="http://www.gunternation.com" target="_blank">http://www.gunternation.com</a></div><div><a href="http://www.slowfooddublin.com" target="_blank">http://www.slowfooddublin.com</a></div><div><br></div><div>"I think we delight to praise what we enjoy because the praise not merely expresses but completes the enjoyment; it is its appointed consummation." Reflections on the Psalms, C.S. Lewis<br>
</div></div>
</div></div>