Top Description Inners Fields Methods
com.sun.jna.platform.unix.solaris

public Interface Kstat2

extends Library
Imports
com.sun.jna.Library, .Native, .Pointer, .PointerType, .Structure, .Structure.FieldOrder, .Union, com.sun.jna.platform.unix.solaris.Kstat2.Kstat2NV.UNION.IntegersArr, .Kstat2.Kstat2NV.UNION.StringsArr, com.sun.jna.ptr.PointerByReference

Kstat2 library. The kstat2 facility is a general-purpose mechanism for providing kernel statistics to users.

Kstat2 is available in Solaris 11.4 and later.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Kstat2.Kstat2Handle

Opaque kstat handle.

public static class
Kstat2.Kstat2Map

Opaque kstat map handle.

public static class
Kstat2.Kstat2MatcherList

Opaque kstat match list.

public static class
Kstat2.Kstat2NV

Immutable Name/Value pair.

Field Summary

Modifier and TypeField and Description
public static final Kstat2
INSTANCE

Requires Solaris 11.4.

public static final int
public static final int
public static final int
public static final short
public static final short
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
Inherited from com.sun.jna.Library:
OPTION_ALLOW_OBJECTSOPTION_CALLING_CONVENTIONOPTION_CLASSLOADEROPTION_FUNCTION_MAPPEROPTION_INVOCATION_MAPPEROPTION_OPEN_FLAGSOPTION_STRING_ENCODINGOPTION_STRUCTURE_ALIGNMENTOPTION_SYMBOL_PROVIDEROPTION_TYPE_MAPPER

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

Upon successful completion, returns a int value of Kstat2#KSTAT2_S_OK. If an error occurs a value other than KSTAT2_S_OK is returned.
kstat2_add_matcher
(int
The type of matcher, from the kstat2_match_type_t enumeration.
type
,
String
The string to match.
match
,
Kstat2.Kstat2MatcherList
The list to which to append the matcher.
matchers
)

Adds matchers to the provided matcher list.

public int

Returns:

Upon successful completion, returns a int value of Kstat2#KSTAT2_S_OK. If an error occurs a value other than KSTAT2_S_OK is returned.
kstat2_alloc_matcher_list
(PointerByReference
Receives a pointer to the allocated matcher list.
matchers
)

Allocates a new matcher list to allow matchers to be provided to the Kstat2#kstat2_open(PointerByReference, Kstat2MatcherList) function.

public int

Returns:

Upon successful completion, returns a int value of Kstat2#KSTAT2_S_OK. If an error occurs a value other than KSTAT2_S_OK is returned.
kstat2_close
(PointerByReference
A reference to the handle to close.
handle
)

The kstat2_close() function frees all resources that are associated with the handle.

public int

Returns:

Upon successful completion, returns a int value of Kstat2#KSTAT2_S_OK. If an error occurs a value other than KSTAT2_S_OK is returned.
kstat2_free_matcher_list
(PointerByReference
A pointer to the Kstat2MatcherList to be freed.
matchers
)

Frees the resources associated with the matcher list.

public int

Returns:

Upon successful completion, the function will set the map parameter to reference the relevant map and Kstat2#KSTAT2_S_OK will be returned. If the requested item cannot be found, the map reference will be set to NULL and an error will be returned.
kstat2_lookup_map
(Kstat2.Kstat2Handle
The handle to obtain the map from.
handle
,
String
The string to match.
uri
,
PointerByReference
Receives a reference to the relevant map.
map
)

Obtains a reference to a kstat2 map given the URI of the map.

public int

Returns:

Upon successful completion, returns Kstat2#KSTAT2_S_OK. If there is an error performing the requested operation, an error code will be returned.
kstat2_map_get
(Kstat2.Kstat2Map
The map from which to retrieve the data.
map
,
String
The uri of the data to retrieve.
name
,
PointerByReference
Receives a reference to the name/value data.
nv
)

Retrieves the name/value (nv) pair identified by the supplied name.

public int

Returns:

Upon successful completion, returns a int value of Kstat2#KSTAT2_S_OK. If an error occurs a value other than KSTAT2_S_OK is returned.
kstat2_open
(PointerByReference
A pointer to the handle to be initialized.
handle
,
Kstat2.Kstat2MatcherList
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.
matchers
)

Initializes an opaque kstat2 handle that provides access to a specific view of the kernel statistics.

public String

Returns:

A descriptive string for the supplied status code.
kstat2_status_string
(int
A value in the kstat2_status enumeration.
status
)

Gives a descriptive error message for the supplied status value.

public int

Returns:

Upon successful completion, returns a int value of Kstat2#KSTAT2_S_OK. If an error occurs a value other than KSTAT2_S_OK is returned.
kstat2_update
(Kstat2.Kstat2Handle
The handle to be updated.
handle
)

Synchronises the user's view with that of the kernel.