Kstat_kv_init

KSTAT(4) - Device Drivers Manual

Kstat_kv_init, Kstat_create, Kstat

KSTAT(4) - Device Drivers Manual # KSTAT(4) - Device Drivers Manual NAME # kstat - kernel statistics SYNOPSIS # pseudo-device kstat DESCRIPTION # The /dev/kstat device exposes kernel statistics (kstats) to userland. IOCTLS # The kstat ioctl(2) calls are provided in <sys/kstat.h>. With the exception of KSTATIOC_VERSION, the kstat ioctl(2) calls use the kstat_req structure to request or enumerate kernel statistic data from the kernel: struct kstat_req { unsigned int ks_rflags; #define KSTATIOC_F_IGNVER (1 << 0) /* the current version of the kstat subsystem */ unsigned int ks_version; uint64_t ks_id; char ks_provider[KSTAT_STRLEN]; unsigned int ks_instance; char ks_name[KSTAT_STRLEN]; unsigned int ks_unit; struct timespec ks_created; struct timespec ks_updated; struct timespec ks_interval; unsigned int ks_type; unsigned int ks_state; void *ks_data; size_t ks_datalen; unsigned int ks_dataver; }; The kstat subsystem increments a version number when a kstat is added to or removed from the subsystem so changes to the set of kstats can be detected. ...