public class KstatUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
KstatUtil.KstatChain
A copy of the Kstat chain, encapsulating a
kstat_ctl_t object. |
Modifier and Type | Method and Description |
---|---|
static long |
dataLookupLong(com.sun.jna.platform.unix.solaris.LibKstat.Kstat ksp,
String name)
Convenience method for
LibKstat.kstat_data_lookup(com.sun.jna.platform.unix.solaris.LibKstat.Kstat, java.lang.String) with numeric return
values. |
static String |
dataLookupString(com.sun.jna.platform.unix.solaris.LibKstat.Kstat ksp,
String name)
Convenience method for
LibKstat.kstat_data_lookup(com.sun.jna.platform.unix.solaris.LibKstat.Kstat, java.lang.String) with String return
values. |
static KstatUtil.KstatChain |
openChain()
Create a copy of the Kstat chain and lock it for use by this object.
|
public static KstatUtil.KstatChain openChain()
KstatUtil.KstatChain.close()
.public static String dataLookupString(com.sun.jna.platform.unix.solaris.LibKstat.Kstat ksp, String name)
LibKstat.kstat_data_lookup(com.sun.jna.platform.unix.solaris.LibKstat.Kstat, java.lang.String)
with String return
values. Searches the kstat's data section for the record with the specified
name. This operation is valid only for kstat types which have named data
records. Currently, only the KSTAT_TYPE_NAMED and KSTAT_TYPE_TIMER kstats
have named data records.ksp
- The kstat to searchname
- The key for the name-value pair, or name of the timer as
applicablepublic static long dataLookupLong(com.sun.jna.platform.unix.solaris.LibKstat.Kstat ksp, String name)
LibKstat.kstat_data_lookup(com.sun.jna.platform.unix.solaris.LibKstat.Kstat, java.lang.String)
with numeric return
values. Searches the kstat's data section for the record with the specified
name. This operation is valid only for kstat types which have named data
records. Currently, only the KSTAT_TYPE_NAMED and KSTAT_TYPE_TIMER kstats
have named data records.ksp
- The kstat to searchname
- The key for the name-value pair, or name of the timer as
applicableCopyright © 2010–2020 oshi. All rights reserved.