Interface Kstat2
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classKstat2.Kstat2HandleOpaque kstat handle.static classKstat2.Kstat2MapOpaque kstat map handle.static classKstat2.Kstat2MatcherListOpaque kstat match list.static classKstat2.Kstat2NVImmutable Name/Value pair.- 
Nested classes/interfaces inherited from interface com.sun.jna.LibraryLibrary.Handler
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static Kstat2INSTANCERequires Solaris 11.4.static intKSTAT2_M_GLOBstatic intKSTAT2_M_REstatic intKSTAT2_M_STRINGstatic shortKSTAT2_NVF_INVALstatic shortKSTAT2_NVF_NONEstatic byteKSTAT2_NVK_ALLstatic byteKSTAT2_NVK_MAPstatic byteKSTAT2_NVK_SYSstatic byteKSTAT2_NVK_USRstatic byteKSTAT2_NVVT_INTstatic byteKSTAT2_NVVT_INTSstatic byteKSTAT2_NVVT_MAPstatic byteKSTAT2_NVVT_STRstatic byteKSTAT2_NVVT_STRSstatic intKSTAT2_S_CONC_MODstatic intKSTAT2_S_DEL_MAPstatic intKSTAT2_S_INVAL_ARGstatic intKSTAT2_S_INVAL_STATEstatic intKSTAT2_S_INVAL_TYPEstatic intKSTAT2_S_NO_MEMstatic intKSTAT2_S_NO_PERMstatic intKSTAT2_S_NO_SPACEstatic intKSTAT2_S_NOT_FOUNDstatic intKSTAT2_S_OKstatic intKSTAT2_S_SYS_FAIL- 
Fields inherited from interface com.sun.jna.LibraryOPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_TYPE_MAPPER
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description intkstat2_add_matcher(int type, java.lang.String match, Kstat2.Kstat2MatcherList matchers)Adds matchers to the provided matcher list.intkstat2_alloc_matcher_list(PointerByReference matchers)Allocates a new matcher list to allow matchers to be provided to thekstat2_open(PointerByReference, Kstat2MatcherList)function.intkstat2_close(PointerByReference handle)The kstat2_close() function frees all resources that are associated with the handle.intkstat2_free_matcher_list(PointerByReference matchers)Frees the resources associated with the matcher list.intkstat2_lookup_map(Kstat2.Kstat2Handle handle, java.lang.String uri, PointerByReference map)Obtains a reference to a kstat2 map given the URI of the map.intkstat2_map_get(Kstat2.Kstat2Map map, java.lang.String name, PointerByReference nv)Retrieves the name/value (nv) pair identified by the supplied name.intkstat2_open(PointerByReference handle, Kstat2.Kstat2MatcherList matchers)Initializes an opaque kstat2 handle that provides access to a specific view of the kernel statistics.java.lang.Stringkstat2_status_string(int status)Gives a descriptive error message for the supplied status value.intkstat2_update(Kstat2.Kstat2Handle handle)Synchronises the user's view with that of the kernel.
 
- 
- 
- 
Field Detail- 
INSTANCEstatic final Kstat2 INSTANCE Requires Solaris 11.4. Users should test for UnsatisfiedLinkError
 - 
KSTAT2_S_OKstatic final int KSTAT2_S_OK - See Also:
- Constant Field Values
 
 - 
KSTAT2_S_NO_PERMstatic final int KSTAT2_S_NO_PERM - See Also:
- Constant Field Values
 
 - 
KSTAT2_S_NO_MEMstatic final int KSTAT2_S_NO_MEM - See Also:
- Constant Field Values
 
 - 
KSTAT2_S_NO_SPACEstatic final int KSTAT2_S_NO_SPACE - See Also:
- Constant Field Values
 
 - 
KSTAT2_S_INVAL_ARGstatic final int KSTAT2_S_INVAL_ARG - See Also:
- Constant Field Values
 
 - 
KSTAT2_S_INVAL_STATEstatic final int KSTAT2_S_INVAL_STATE - See Also:
- Constant Field Values
 
 - 
KSTAT2_S_INVAL_TYPEstatic final int KSTAT2_S_INVAL_TYPE - See Also:
- Constant Field Values
 
 - 
KSTAT2_S_NOT_FOUNDstatic final int KSTAT2_S_NOT_FOUND - See Also:
- Constant Field Values
 
 - 
KSTAT2_S_CONC_MODstatic final int KSTAT2_S_CONC_MOD - See Also:
- Constant Field Values
 
 - 
KSTAT2_S_DEL_MAPstatic final int KSTAT2_S_DEL_MAP - See Also:
- Constant Field Values
 
 - 
KSTAT2_S_SYS_FAILstatic final int KSTAT2_S_SYS_FAIL - See Also:
- Constant Field Values
 
 - 
KSTAT2_M_STRINGstatic final int KSTAT2_M_STRING - See Also:
- Constant Field Values
 
 - 
KSTAT2_M_GLOBstatic final int KSTAT2_M_GLOB - See Also:
- Constant Field Values
 
 - 
KSTAT2_M_REstatic final int KSTAT2_M_RE - See Also:
- Constant Field Values
 
 - 
KSTAT2_NVVT_MAPstatic final byte KSTAT2_NVVT_MAP - See Also:
- Constant Field Values
 
 - 
KSTAT2_NVVT_INTstatic final byte KSTAT2_NVVT_INT - See Also:
- Constant Field Values
 
 - 
KSTAT2_NVVT_INTSstatic final byte KSTAT2_NVVT_INTS - See Also:
- Constant Field Values
 
 - 
KSTAT2_NVVT_STRstatic final byte KSTAT2_NVVT_STR - See Also:
- Constant Field Values
 
 - 
KSTAT2_NVVT_STRSstatic final byte KSTAT2_NVVT_STRS - See Also:
- Constant Field Values
 
 - 
KSTAT2_NVK_SYSstatic final byte KSTAT2_NVK_SYS - See Also:
- Constant Field Values
 
 - 
KSTAT2_NVK_USRstatic final byte KSTAT2_NVK_USR - See Also:
- Constant Field Values
 
 - 
KSTAT2_NVK_MAPstatic final byte KSTAT2_NVK_MAP - See Also:
- Constant Field Values
 
 - 
KSTAT2_NVK_ALLstatic final byte KSTAT2_NVK_ALL - See Also:
- Constant Field Values
 
 - 
KSTAT2_NVF_NONEstatic final short KSTAT2_NVF_NONE - See Also:
- Constant Field Values
 
 - 
KSTAT2_NVF_INVALstatic final short KSTAT2_NVF_INVAL - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
kstat2_openint kstat2_open(PointerByReference handle, Kstat2.Kstat2MatcherList matchers) Initializes an opaque kstat2 handle that provides access to a specific view of the kernel statistics.- Parameters:
- handle- A pointer to the handle to be initialized.
- matchers- Only kstats that match one or more of the provided matchers will be available. If a NULL or empty matcher list is provided, all of the system's kstats will be available, which is equivalent to calling the kstat2_open() function. Restricting the number of kstats available will improve performance and reduce the memory footprint.
- Returns:
- Upon successful completion, returns a int value of
         KSTAT2_S_OK. If an error occurs a value other than KSTAT2_S_OK is returned.
 
 - 
kstat2_updateint kstat2_update(Kstat2.Kstat2Handle handle) Synchronises the user's view with that of the kernel. The kernel may at any point add or remove kstats, causing the user's view of the available kstats to become out of date. The kstat2_update() function should be called periodically to resynchronise the two views.- Parameters:
- handle- The handle to be updated.
- Returns:
- Upon successful completion, returns a int value of
         KSTAT2_S_OK. If an error occurs a value other than KSTAT2_S_OK is returned.
 
 - 
kstat2_closeint kstat2_close(PointerByReference handle) The kstat2_close() function frees all resources that are associated with the handle. It is the caller's responsibility to free any allocated matcher list by calling the kstat2_free_matcher_list() function.- Parameters:
- handle- A reference to the handle to close.
- Returns:
- Upon successful completion, returns a int value of
         KSTAT2_S_OK. If an error occurs a value other than KSTAT2_S_OK is returned.
 
 - 
kstat2_alloc_matcher_listint kstat2_alloc_matcher_list(PointerByReference matchers) Allocates a new matcher list to allow matchers to be provided to thekstat2_open(PointerByReference, Kstat2MatcherList)function.- Parameters:
- matchers- Receives a pointer to the allocated matcher list.
- Returns:
- Upon successful completion, returns a int value of
         KSTAT2_S_OK. If an error occurs a value other than KSTAT2_S_OK is returned.
 
 - 
kstat2_free_matcher_listint kstat2_free_matcher_list(PointerByReference matchers) Frees the resources associated with the matcher list.- Parameters:
- matchers- A pointer to the- Kstat2.Kstat2MatcherListto be freed.
- Returns:
- Upon successful completion, returns a int value of
         KSTAT2_S_OK. If an error occurs a value other than KSTAT2_S_OK is returned.
 
 - 
kstat2_add_matcherint kstat2_add_matcher(int type, java.lang.String match, Kstat2.Kstat2MatcherList matchers)Adds matchers to the provided matcher list. Each call appends the new matcher to the provided matcher list. Matches are on kstat URI, with the following match types supported:KSTAT2_M_STRINGwhich performs a directstrcmpwith the kstat URI,KSTAT2_M_GLOBwhich performs a glob pattern match usinggmatch, andKSTAT2_M_REwhich performs a Perl Compatible Regular Expression (PCRE) match usingpcre_exec.- Parameters:
- type- The type of matcher, from the- kstat2_match_type_tenumeration.
- match- The string to match.
- matchers- The list to which to append the matcher.
- Returns:
- Upon successful completion, returns a int value of
         KSTAT2_S_OK. If an error occurs a value other than KSTAT2_S_OK is returned.
 
 - 
kstat2_lookup_mapint kstat2_lookup_map(Kstat2.Kstat2Handle handle, java.lang.String uri, PointerByReference map) Obtains a reference to a kstat2 map given the URI of the map.- Parameters:
- handle- The handle to obtain the map from.
- uri- The string to match.
- map- Receives a reference to the relevant map.
- Returns:
- Upon successful completion, the function will set the map parameter
         to reference the relevant map and KSTAT2_S_OKwill be returned. If the requested item cannot be found, the map reference will be set toNULLand an error will be returned.
 
 - 
kstat2_map_getint kstat2_map_get(Kstat2.Kstat2Map map, java.lang.String name, PointerByReference nv) Retrieves the name/value (nv) pair identified by the supplied name. The reference returned is managed by the library and must not be passed to free().- Parameters:
- map- The map from which to retrieve the data.
- name- The uri of the data to retrieve.
- nv- Receives a reference to the name/value data.
- Returns:
- Upon successful completion, returns KSTAT2_S_OK. If there is an error performing the requested operation, an error code will be returned.
 
 - 
kstat2_status_stringjava.lang.String kstat2_status_string(int status) Gives a descriptive error message for the supplied status value.- Parameters:
- status- A value in the- kstat2_statusenumeration.
- Returns:
- A descriptive string for the supplied status code.
 
 
- 
 
-