1 /* doesn't work, feel free to finish this */
5 static kstat_ctl_t *kstat;
6 static int kstat_updated;
8 static void update_kstat()
13 ERR("can't open kstat: %s", strerror(errno));
17 if (kstat_chain_update(kstat) == -1) {
18 perror("kstat_chain_update");
34 ksp = kstat_lookup(kstat, "unix", -1, "system_misc");
36 if (kstat_read(kstat, ksp, NULL) >= 0) {
39 (kstat_named_t *) kstat_data_lookup(ksp,
43 (double) knp->value.ui32;