libkstat2 - kernel statistics facility, version 2
cc [ flag... ] file... -lkstat2 [ library... ] #include <kstat2.h>
Functions in this library define the interface for reading kernel statistics. The <kstat2.h> header provides type and function declarations for all the libkstat2 library services.
The shared object libkstat2.so.1 provides the public interfaces defined below. See intro(3) man page for additional information on shared object interfaces.
Closes the kstats session
Allocates a new matcher list
Creates a new matcher and appends it to the matcher list
Frees the matcher list
Looks up a kstat map by URI
Gets the maps flags
Gets a name/value from a kstat map
Gets the user data for a map
Gets the metadata for a kstat map
Gets the parent of a kstat map
Adds an integer value to a kstat map
Adds an integer value to a kstat map
Adds a string value to a kstat map
Adds a string value to a kstat map
Removes a value from a kstat map
Sets the tree modified callback for a map
Sets the data modified callback for a map
Sets the map removed callback for a map
Sets the user data for a map
Gets the number of elements in a kstat map
Gets an array containing all the map members
Gets the URI for a map
Finishes the use of the iterator
Determines if the iterator has further values
Gets the next map value from the iterator
Removes the current iterated value from the map
Creates a new iterator for a map
Allocates a new map reference
Dereferences a map reference
Frees a map reference
Gets the metadata for a name/value
Gets the URI for a name/value
Opens a new kstats session and obtain a handle
Maps a status to a descriptive string
Refreshes the kstat maps
Decodes any URI-unsafe characters in a string
Encodes any URI-unsafe characters in a string
Kernel statistics driver
Header
Shared object
64-bit shared object
For more information, see the kstat2(3KSTAT2) man page.
See attributes(7) for descriptions of the following attributes:
|
kstat2_close(3KSTAT2), kstat2_alloc_matcher_list(3KSTAT2), kstat2_add_matcher(3KSTAT2), kstat2_free_matcher_list(3KSTAT2), kstat2_lookup_map(3KSTAT2), kstat2_map_get(3KSTAT2), kstat2_map_get_userdata(3KSTAT2), kstat2_map_meta(3KSTAT2), kstat2_map_parent(3KSTAT2), kstat2_map_put_integer(3KSTAT2), kstat2_map_put_integers(3KSTAT2), kstat2_map_put_string(3KSTAT2), kstat2_map_put_strings(3KSTAT2), kstat2_map_remove(3KSTAT2), kstat2_map_set_data_cb(3KSTAT2), kstat2_map_set_destroy_cb(3KSTAT2), kstat2_map_set_tree_cb(3KSTAT2), kstat2_map_set_userdata(3KSTAT2), kstat2_map_size(3KSTAT2), kstat2_map_to_array(3KSTAT2), kstat2_map_uri(3KSTAT2), kstat2_mapiter_end(3KSTAT2), kstat2_mapiter_hasnext(3KSTAT2), kstat2_mapiter_next(3KSTAT2), kstat2_mapiter_remove(3KSTAT2), kstat2_mapiter_start(3KSTAT2), kstat2_mapref_alloc(3KSTAT2), kstat2_mapref_deref(3KSTAT2), kstat2_mapref_free(3KSTAT2), kstat2_nv_meta(3KSTAT2), kstat2_open(3KSTAT2), kstat2_status_string(3KSTAT2), kstat2_update(3KSTAT2), kstat2_uri_decode(3KSTAT2), kstat2_uri_encode(3KSTAT2), kstat2(3KSTAT2)
The kstat2 functions are MT-Safe with the exception that only one thread may actively use a kstat2_handle_t, or any object obtained through it, at any one time. Synchronization is required if multiple threads intend to share a kstat2_handle_t or any object obtained through it. Synchronization is left to the application.