Lines Matching defs:kstat
27 #include <kstat.h>
44 kstat_t *kstat;
55 kstat_t *kstat;
68 // Get kstat cpu_stat counters for every CPU
69 // (loop over kstat to find our cpu_stat(s)
71 for (kstat = kstat_ctrl->kc_chain; kstat != NULL; kstat = kstat->ks_next) {
72 if (strncmp(kstat->ks_module, "cpu_stat", 8) == 0) {
74 if (kstat_read(kstat_ctrl, kstat, NULL) == -1) {
75 // Failed to initialize kstat for this CPU so ignore it
84 cpu_loads[i++].kstat = kstat;
111 if (load->kstat == NULL) {
115 if (kstat_read(kstat_ctrl, load->kstat, cpu_stat) == -1) {
116 // disabling for now, a kstat chain update is likely to happen next time
117 load->kstat = NULL;