Class Kstat


  • public final class Kstat
    extends java.lang.Object
    Wraps libkstat(3lib). See /usr/include/sys/kstat.h for details.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      HRTime getCreationTime()
      Returns the kstat's ks_crtime field.
      HRTime getSnapTime()
      Returns the kstat's ks_snaptime field.
      java.lang.Object getValue​(java.lang.String name)
      Returns the named value -- the value of the named kstat, or field in a raw kstat, as applicable, and available.
      void read()
      Invokes kstat_read(3kstat) for tho underlying kstat.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getSnapTime

        public HRTime getSnapTime()
        Returns the kstat's ks_snaptime field.
      • getCreationTime

        public HRTime getCreationTime()
        Returns the kstat's ks_crtime field.
      • getValue

        public java.lang.Object getValue​(java.lang.String name)
                                  throws KstatTypeNotSupportedException
        Returns the named value -- the value of the named kstat, or field in a raw kstat, as applicable, and available. Returns null if no such named kstat or field is available.
        Throws:
        KstatTypeNotSupportedException - if the raw kstat is not understood. (Presenstly, none are.)
      • read

        public void read()
                  throws KstatReadException
        Invokes kstat_read(3kstat) for tho underlying kstat. Throws KstatException if the native function returns an error.
        Throws:
        KstatReadException