Schnittstelle Kstat2
- Alle Superschnittstellen:
Library
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.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypSchnittstelleBeschreibungstatic classOpaque kstat handle.static classOpaque kstat map handle.static classOpaque kstat match list.static classImmutable Name/Value pair.Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen com.sun.jna.Library
Library.Handler -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final Kstat2Requires Solaris 11.4.static final intstatic final intstatic final intstatic final shortstatic final shortstatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intVon Schnittstelle geerbte Felder com.sun.jna.Library
OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_SYMBOL_PROVIDER, OPTION_TYPE_MAPPER -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungintkstat2_add_matcher(int type, 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, String uri, PointerByReference map) Obtains a reference to a kstat2 map given the URI of the map.intkstat2_map_get(Kstat2.Kstat2Map map, 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.kstat2_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.
-
Felddetails
-
INSTANCE
Requires Solaris 11.4. Users should test for UnsatisfiedLinkError -
KSTAT2_S_OK
static final int KSTAT2_S_OK- Siehe auch:
-
KSTAT2_S_NO_PERM
static final int KSTAT2_S_NO_PERM- Siehe auch:
-
KSTAT2_S_NO_MEM
static final int KSTAT2_S_NO_MEM- Siehe auch:
-
KSTAT2_S_NO_SPACE
static final int KSTAT2_S_NO_SPACE- Siehe auch:
-
KSTAT2_S_INVAL_ARG
static final int KSTAT2_S_INVAL_ARG- Siehe auch:
-
KSTAT2_S_INVAL_STATE
static final int KSTAT2_S_INVAL_STATE- Siehe auch:
-
KSTAT2_S_INVAL_TYPE
static final int KSTAT2_S_INVAL_TYPE- Siehe auch:
-
KSTAT2_S_NOT_FOUND
static final int KSTAT2_S_NOT_FOUND- Siehe auch:
-
KSTAT2_S_CONC_MOD
static final int KSTAT2_S_CONC_MOD- Siehe auch:
-
KSTAT2_S_DEL_MAP
static final int KSTAT2_S_DEL_MAP- Siehe auch:
-
KSTAT2_S_SYS_FAIL
static final int KSTAT2_S_SYS_FAIL- Siehe auch:
-
KSTAT2_M_STRING
static final int KSTAT2_M_STRING- Siehe auch:
-
KSTAT2_M_GLOB
static final int KSTAT2_M_GLOB- Siehe auch:
-
KSTAT2_M_RE
static final int KSTAT2_M_RE- Siehe auch:
-
KSTAT2_NVVT_MAP
static final byte KSTAT2_NVVT_MAP- Siehe auch:
-
KSTAT2_NVVT_INT
static final byte KSTAT2_NVVT_INT- Siehe auch:
-
KSTAT2_NVVT_INTS
static final byte KSTAT2_NVVT_INTS- Siehe auch:
-
KSTAT2_NVVT_STR
static final byte KSTAT2_NVVT_STR- Siehe auch:
-
KSTAT2_NVVT_STRS
static final byte KSTAT2_NVVT_STRS- Siehe auch:
-
KSTAT2_NVK_SYS
static final byte KSTAT2_NVK_SYS- Siehe auch:
-
KSTAT2_NVK_USR
static final byte KSTAT2_NVK_USR- Siehe auch:
-
KSTAT2_NVK_MAP
static final byte KSTAT2_NVK_MAP- Siehe auch:
-
KSTAT2_NVK_ALL
static final byte KSTAT2_NVK_ALL- Siehe auch:
-
KSTAT2_NVF_NONE
static final short KSTAT2_NVF_NONE- Siehe auch:
-
KSTAT2_NVF_INVAL
static final short KSTAT2_NVF_INVAL- Siehe auch:
-
-
Methodendetails
-
kstat2_open
Initializes an opaque kstat2 handle that provides access to a specific view of the kernel statistics.- Parameter:
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.- Gibt zurück:
- 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_update
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.- Parameter:
handle- The handle to be updated.- Gibt zurück:
- 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_close
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.- Parameter:
handle- A reference to the handle to close.- Gibt zurück:
- 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_list
Allocates a new matcher list to allow matchers to be provided to thekstat2_open(PointerByReference, Kstat2MatcherList)function.- Parameter:
matchers- Receives a pointer to the allocated matcher list.- Gibt zurück:
- 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_list
Frees the resources associated with the matcher list.- Parameter:
matchers- A pointer to theKstat2.Kstat2MatcherListto be freed.- Gibt zurück:
- 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_matcher
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.- Parameter:
type- The type of matcher, from thekstat2_match_type_tenumeration.match- The string to match.matchers- The list to which to append the matcher.- Gibt zurück:
- 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_map
Obtains a reference to a kstat2 map given the URI of the map.- Parameter:
handle- The handle to obtain the map from.uri- The string to match.map- Receives a reference to the relevant map.- Gibt zurück:
- 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_get
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().- Parameter:
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.- Gibt zurück:
- Upon successful completion, returns
KSTAT2_S_OK. If there is an error performing the requested operation, an error code will be returned.
-
kstat2_status_string
Gives a descriptive error message for the supplied status value.- Parameter:
status- A value in thekstat2_statusenumeration.- Gibt zurück:
- A descriptive string for the supplied status code.
-