[collectd] disk plugin metrics on solaris

Bill Gunter tulanian at gmail.com
Thu Apr 4 17:45:53 CEST 2013


Folks,

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):

#elif HAVE_LIBKSTAT
# if HAVE_KSTAT_IO_T_WRITES && HAVE_KSTAT_IO_T_NWRITES &&
HAVE_KSTAT_IO_T_WTIME
#  define KIO_ROCTETS reads
#  define KIO_WOCTETS writes
#  define KIO_ROPS    nreads
#  define KIO_WOPS    nwrites
#  define KIO_RTIME   rtime
#  define KIO_WTIME   wtime
# elif HAVE_KSTAT_IO_T_NWRITTEN && HAVE_KSTAT_IO_T_WRITES &&
HAVE_KSTAT_IO_T_WTIME
#  define KIO_ROCTETS nread
#  define KIO_WOCTETS nwritten
#  define KIO_ROPS    reads
#  define KIO_WOPS    writes
#  define KIO_RTIME   rtime
#  define KIO_WTIME   wtime
# else
#  error "kstat_io_t does not have the required members"
# endif
        static kstat_io_t kio;
        int i;

        if (kc == NULL)
                return (-1);

        for (i = 0; i < numdisk; i++)
        {
                if (kstat_read (kc, ksp[i], &kio) == -1)
                        continue;

                if (strncmp (ksp[i]->ks_class, "disk", 4) == 0)
                        disk_submit (ksp[i]->ks_name, "disk_octets",
                                        kio.KIO_ROCTETS, kio.KIO_WOCTETS);
                        disk_submit (ksp[i]->ks_name, "disk_ops",
                                        kio.KIO_ROPS, kio.KIO_WOPS);
                        /* FIXME: Convert this to microseconds if necessary
*/
                        disk_submit (ksp[i]->ks_name, "disk_time",
                                        kio.KIO_RTIME, kio.KIO_WTIME);
                }
                else if (strncmp (ksp[i]->ks_class, "partition", 9) == 0)
                {
                        disk_submit (ksp[i]->ks_name, "disk_octets",
                                        kio.KIO_ROCTETS, kio.KIO_WOCTETS);
                        disk_submit (ksp[i]->ks_name, "disk_ops",
                                        kio.KIO_ROPS, kio.KIO_WOPS);
                }
        }
/* #endif defined(HAVE_LIBKSTAT) */

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?

Thanks,

---
See my vizify bio!
[image: William Gunter's Visual
Thumbprint]<https://www.vizify.com/es/501a727aba8a2200020003b3>
http://www.gunternation.com
http://www.slowfooddublin.com

"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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20130404/79ddb8cd/attachment.html>


More information about the collectd mailing list