Home
last modified time | relevance | path

Searched refs:kc (Results 1 – 25 of 65) sorted by relevance

123

/illumos-gate/usr/src/cmd/powertop/common/
H A Dbattery.c69 kstat_ctl_t *kc = kstat_open(); in pt_battery_mod_lookup() local
71 if (kstat_lookup(kc, kstat_batt_mod[1], 0, NULL)) in pt_battery_mod_lookup()
74 if (kstat_lookup(kc, kstat_batt_mod[2], 0, NULL)) in pt_battery_mod_lookup()
79 (void) kstat_close(kc); in pt_battery_mod_lookup()
115 kstat_ctl_t *kc; in pt_battery_stat_snapshot() local
119 kc = kstat_open(); in pt_battery_stat_snapshot()
128 ksp = kstat_lookup(kc, kstat_batt_mod[kstat_batt_idx], 0, in pt_battery_stat_snapshot()
132 (void) kstat_close(kc); in pt_battery_stat_snapshot()
136 (void) kstat_read(kc, ksp, NULL); in pt_battery_stat_snapshot()
140 (void) kstat_close(kc); in pt_battery_stat_snapshot()
[all …]
H A Dturbo.c65 kstat_ctl_t *kc; in pt_turbo_init() local
72 if ((kc = kstat_open()) == NULL) { in pt_turbo_init()
77 ksp = kstat_lookup(kc, "turbo", 0, NULL); in pt_turbo_init()
80 (void) kstat_close(kc); in pt_turbo_init()
84 (void) kstat_read(kc, ksp, NULL); in pt_turbo_init()
90 (void) kstat_close(kc); in pt_turbo_init()
103 (void) kstat_close(kc); in pt_turbo_init()
114 kstat_ctl_t *kc; in pt_turbo_snapshot() local
120 if ((kc = kstat_open()) == NULL) in pt_turbo_snapshot()
125 ksp = kstat_lookup(kc, "turbo", g_cpu_table[cpu], NULL); in pt_turbo_snapshot()
[all …]
H A Dcpufreq.c165 kstat_ctl_t *kc; in pt_cpufreq_stat_prepare() local
186 if ((kc = kstat_open()) == NULL) in pt_cpufreq_stat_prepare()
189 ksp = kstat_lookup(kc, "cpu_info", g_cpu_table[g_observed_cpu], NULL); in pt_cpufreq_stat_prepare()
193 (void) kstat_close(kc); in pt_cpufreq_stat_prepare()
197 (void) kstat_read(kc, ksp, NULL); in pt_cpufreq_stat_prepare()
223 (void) kstat_close(kc); in pt_cpufreq_stat_prepare()
374 kstat_ctl_t *kc; in pt_cpufreq_snapshot() local
378 if ((kc = kstat_open()) == NULL) in pt_cpufreq_snapshot()
383 ret = pt_cpufreq_snapshot_cpu(kc, g_observed_cpu); in pt_cpufreq_snapshot()
388 if ((ret = pt_cpufreq_snapshot_cpu(kc, i)) != 0) in pt_cpufreq_snapshot()
[all …]
/illumos-gate/usr/src/lib/libkstat/common/
H A Dkstat.c53 kstat_chain_free(kstat_ctl_t *kc) in kstat_chain_free() argument
57 ksp = kc->kc_chain; in kstat_chain_free()
64 kc->kc_chain = NULL; in kstat_chain_free()
65 kc->kc_chain_id = 0; in kstat_chain_free()
71 kstat_ctl_t *kc; in kstat_open() local
77 kstat_zalloc((void **)&kc, sizeof (kstat_ctl_t), 0); in kstat_open()
78 if (kc == NULL) in kstat_open()
81 kc->kc_kd = kd; in kstat_open()
82 kc->kc_chain = NULL; in kstat_open()
83 kc->kc_chain_id = 0; in kstat_open()
[all …]
/illumos-gate/usr/src/cmd/fs.d/nfs/nfsstat/
H A Dnfsstat.c71 static kstat_ctl_t *kc = NULL; /* libkstat cookie */ variable
324 kstat_close(kc); in main()
336 safe_kstat_read(kc, rpc_clts_client_kstat, NULL); in getstats_rpc()
341 safe_kstat_read(kc, rpc_cots_client_kstat, NULL); in getstats_rpc()
346 safe_kstat_read(kc, rpc_rdma_client_kstat, NULL); in getstats_rpc()
351 safe_kstat_read(kc, rpc_clts_server_kstat, NULL); in getstats_rpc()
355 safe_kstat_read(kc, rpc_cots_server_kstat, NULL); in getstats_rpc()
359 safe_kstat_read(kc, rpc_rdma_server_kstat, NULL); in getstats_rpc()
371 safe_kstat_read(kc, nfs_client_kstat, NULL); in getstats_nfs()
375 safe_kstat_read(kc, nfs4_client_kstat, NULL); in getstats_nfs()
[all …]
/illumos-gate/usr/src/cmd/stat/common/
H A Dacquire.c52 kstat_lookup_read(kstat_ctl_t *kc, char *module, in kstat_lookup_read() argument
55 kstat_t *ksp = kstat_lookup(kc, module, instance, name); in kstat_lookup_read()
58 if (kstat_read(kc, ksp, NULL) == -1) in kstat_lookup_read()
70 acquire_cpus(struct snapshot *ss, kstat_ctl_t *kc) in acquire_cpus() argument
89 if ((ksp = kstat_lookup_read(kc, "cpu_info", i, NULL)) == NULL) in acquire_cpus()
99 if ((ksp = kstat_lookup_read(kc, "cpu", i, "vm")) == NULL) in acquire_cpus()
105 if ((ksp = kstat_lookup_read(kc, "cpu", i, "sys")) == NULL) in acquire_cpus()
184 acquire_intrs(struct snapshot *ss, kstat_ctl_t *kc) in acquire_intrs() argument
194 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in acquire_intrs()
203 sys_misc = kstat_lookup_read(kc, "unix", 0, "system_misc"); in acquire_intrs()
[all …]
H A Ddsr.c81 extern kstat_ctl_t *kc;
383 lookup_nfs_name(char *ks, kstat_ctl_t *kc) in lookup_nfs_name() argument
399 host = cur_hostname(minor, kc); in lookup_nfs_name()
448 cur_hostname(uint_t minor, kstat_ctl_t *kc) in cur_hostname() argument
454 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in cur_hostname()
465 if (kstat_read(kc, ksp, &mik) == -1) in cur_hostname()
H A Dacquire_iodevs.c501 acquire_iodev_stats(struct iodev_snapshot *list, kstat_ctl_t *kc) in acquire_iodev_stats() argument
509 if (kstat_read(kc, pos->is_ksp, &pos->is_stats) == -1) in acquire_iodev_stats()
516 if ((err = acquire_iodev_stats(pos->is_children, kc))) in acquire_iodev_stats()
533 acquire_iodev_errors(struct snapshot *ss, kstat_ctl_t *kc) in acquire_iodev_errors() argument
537 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in acquire_iodev_errors()
566 if (kstat_read(kc, ksp, NULL) == -1) in acquire_iodev_errors()
630 kstat_ctl_t *kc) in get_pretty_name() argument
639 iodev->is_pretty = lookup_nfs_name(iodev->is_name, kc); in get_pretty_name()
1008 acquire_iodevs(struct snapshot *ss, kstat_ctl_t *kc, struct iodev_filter *df) in acquire_iodevs() argument
1024 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in acquire_iodevs()
[all …]
/illumos-gate/usr/src/cmd/sa/
H A Dsadc.c68 static kstat_ctl_t *kc; /* libkstat cookie */ variable
210 if ((kc = kstat_open()) == NULL) in main()
288 (void) kstat_chain_update(kc); in main()
329 sysinfo_ksp = safe_kstat_lookup(kc, "unix", 0, "sysinfo"); in all_stat_init()
330 vminfo_ksp = safe_kstat_lookup(kc, "unix", 0, "vminfo"); in all_stat_init()
331 kmem_oversize_ksp = safe_kstat_lookup(kc, "vmem", -1, "kmem_oversize"); in all_stat_init()
332 var_ksp = safe_kstat_lookup(kc, "unix", 0, "var"); in all_stat_init()
333 system_misc_ksp = safe_kstat_lookup(kc, "unix", 0, "system_misc"); in all_stat_init()
334 file_cache_ksp = safe_kstat_lookup(kc, "unix", 0, "file_cache"); in all_stat_init()
335 ufs_inode_ksp = kstat_lookup(kc, "ufs", 0, "inode_cache"); in all_stat_init()
[all …]
/illumos-gate/usr/src/cmd/power/
H A Dsysstat.c48 static kstat_ctl_t *kc; /* libkstat cookie */ variable
127 if ((kc = kstat_open()) == NULL) { in sysstat_init()
204 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in init_disks()
259 if (kstat_read(kc, disk->ks, in diskinfo_load()
275 while (kstat_chain_update(kc) || diskinfo_load()) { in check_disks()
302 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in cpu_stats_init()
312 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in cpu_stats_init()
315 kstat_read(kc, ksp, NULL) != -1) in cpu_stats_init()
336 if (kstat_read(kc, cpu_stats_list[i], NULL) == -1) in cpu_stats_load()
365 while (kstat_chain_update(kc) || cpu_stats_load()) { in check_tty()
[all …]
/illumos-gate/usr/src/lib/libfakekernel/common/
H A Dkmem.c108 kmem_cache_destroy(kmem_cache_t *kc) in kmem_cache_destroy() argument
110 umem_cache_destroy((umem_cache_t *)kc); in kmem_cache_destroy()
114 kmem_cache_alloc(kmem_cache_t *kc, int kmflags) in kmem_cache_alloc() argument
116 return (umem_cache_alloc((umem_cache_t *)kc, in kmem_cache_alloc()
121 kmem_cache_free(kmem_cache_t *kc, void *p) in kmem_cache_free() argument
123 umem_cache_free((umem_cache_t *)kc, p); in kmem_cache_free()
128 kmem_cache_set_move(kmem_cache_t *kc, in kmem_cache_set_move() argument
141 kmem_cache_reap_soon(kmem_cache_t *kc) in kmem_cache_reap_soon() argument
/illumos-gate/usr/src/cmd/sendmail/libsm/
H A Dmemstat.c91 static kstat_ctl_t *kc;
109 kc = kstat_open();
110 if (kc == NULL)
112 kst = kstat_lookup(kc, "unix", 0,
134 if (kc == NULL)
136 r = kstat_close(kc);
162 if (kc == NULL || kst == NULL)
164 if (kstat_read(kc, kst, NULL) == -1)
/illumos-gate/usr/src/cmd/hal/hald/solaris/
H A Ddevinfo_cpu.c52 kstat_ctl_t *kc; in devinfo_cpu_add() local
182 kc = kstat_open (); in devinfo_cpu_add()
183 if (kc == NULL) { in devinfo_cpu_add()
189 ksp = kstat_lookup (kc, "cpu_info", cpu_id, NULL); in devinfo_cpu_add()
193 if (kc) { in devinfo_cpu_add()
194 kstat_close (kc); in devinfo_cpu_add()
199 kstat_read (kc, ksp, NULL); in devinfo_cpu_add()
239 if (kc) { in devinfo_cpu_add()
240 kstat_close (kc); in devinfo_cpu_add()
/illumos-gate/usr/src/uts/common/inet/ip/
H A Dkeysock.c479 keysock_consumer_t *kc; in keysock_close() local
491 kc = (keysock_consumer_t *)ptr; in keysock_close()
492 keystack = kc->kc_keystack; in keysock_close()
495 kc->kc_sa_type)); in keysock_close()
500 if (kc->kc_flags & KC_FLUSHING) { in keysock_close()
524 keystack->keystack_consumers[kc->kc_sa_type] = NULL; in keysock_close()
526 mutex_destroy(&kc->kc_lock); in keysock_close()
527 netstack_rele(kc->kc_keystack->keystack_netstack); in keysock_close()
560 keysock_consumer_t *kc; in keysock_open() local
599 kc = kmem_zalloc(sizeof (keysock_consumer_t), KM_NOSLEEP); in keysock_open()
[all …]
/illumos-gate/usr/src/cmd/fm/schemes/cpu/
H A Dcpu.c76 kstat_ctl_t *kc; in cpu_cpuid_present() local
78 if ((kc = kstat_open()) == NULL) in cpu_cpuid_present()
80 ksp = kstat_lookup(kc, "cpu_info", cpuid, NULL); in cpu_cpuid_present()
81 (void) kstat_close(kc); in cpu_cpuid_present()
95 kstat_ctl_t *kc; in cpu_get_serialid_kstat() local
99 if ((kc = kstat_open()) == NULL) in cpu_get_serialid_kstat()
102 if ((ksp = kstat_lookup(kc, "cpu_info", cpuid, NULL)) == NULL) { in cpu_get_serialid_kstat()
103 (void) kstat_close(kc); in cpu_get_serialid_kstat()
107 if (kstat_read(kc, ksp, NULL) == -1) { in cpu_get_serialid_kstat()
109 (void) kstat_close(kc); in cpu_get_serialid_kstat()
[all …]
/illumos-gate/usr/src/lib/sun_sas/common/
H A DSun_sasGetPhyStatistics.c45 kstat_ctl_t *kc; in Sun_sasGetPhyStatistics() local
190 kc = kstat_open(); in Sun_sasGetPhyStatistics()
191 if (kc == NULL) { in Sun_sasGetPhyStatistics()
198 ksp = kstat_lookup(kc, NULL, -1, kstat_name); in Sun_sasGetPhyStatistics()
205 (void) kstat_close(kc); in Sun_sasGetPhyStatistics()
209 if (kstat_read(kc, ksp, NULL) == -1) { in Sun_sasGetPhyStatistics()
215 (void) kstat_close(kc); in Sun_sasGetPhyStatistics()
259 (void) kstat_close(kc); in Sun_sasGetPhyStatistics()
/illumos-gate/usr/src/cmd/busstat/
H A Dbusstat.c65 static kstat_ctl_t *kc; /* libkstat cookie */ variable
122 if ((kc = kstat_open()) == NULL) { in main()
277 if ((cnt_ksp = kstat_lookup(kc, device, inst_num, "counters")) in print_evt()
284 if (kstat_read(kc, cnt_ksp, NULL) == FAIL) { in print_evt()
315 if (kstat_read(kc, pic_ksp, NULL) == FAIL) { in print_evt()
359 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in print_dev()
628 if ((cnt_ksp = kstat_lookup(kc, dev_name, in add_dev_node()
636 if (kstat_read(kc, cnt_ksp, NULL) == FAIL) { in add_dev_node()
710 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in add_all_dev_node()
786 if (kstat_read(kc, pic_ksp, NULL) == FAIL) { in modify_evt_node()
[all …]
/illumos-gate/usr/src/cmd/rpcsvc/
H A Drstat_proc.c66 static kstat_ctl_t *kc; /* libkstat cookie */ variable
180 if ((kc = kstat_open()) == NULL) in stat_init()
319 (void) kstat_chain_update(kc); in updatestat()
716 system_misc_ksp = safe_kstat_lookup(kc, "unix", 0, "system_misc"); in system_stat_init()
718 safe_kstat_read(kc, system_misc_ksp, NULL); in system_stat_init()
732 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) in system_stat_init()
741 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) in system_stat_init()
744 kstat_read(kc, ksp, NULL) != -1) { in system_stat_init()
747 if ((ksp = kstat_lookup(kc, "cpu", ksp->ks_instance, in system_stat_init()
748 "vm")) != NULL && kstat_read(kc, ksp, NULL) != -1) in system_stat_init()
[all …]
/illumos-gate/usr/src/lib/libdiskmgt/common/
H A Ddrive.c347 static int get_disk_kstats(kstat_ctl_t *kc, char *diskname,
350 static int get_err_kstats(kstat_ctl_t *kc, char *diskname,
352 static int get_io_kstats(kstat_ctl_t *kc, char *diskname,
534 kstat_ctl_t *kc; in drive_get_stats() local
543 if ((kc = kstat_open()) == NULL) { in drive_get_stats()
557 status = get_io_kstats(kc, ap->kstat_name, in drive_get_stats()
560 status = get_err_kstats(kc, ap->kstat_name, in drive_get_stats()
566 (void) kstat_close(kc); in drive_get_stats()
574 (void) kstat_close(kc); in drive_get_stats()
974 get_disk_kstats(kstat_ctl_t *kc, char *diskname, char *classname, in get_disk_kstats() argument
[all …]
/illumos-gate/usr/src/lib/libprtdiag_psr/sparc/opl/common/
H A Dopl.c740 kstat_ctl_t *kc; in opl_disp_environ() local
744 if ((kc = kstat_open()) == NULL) in opl_disp_environ()
748 (kc, "scfd", 0, SCF_SYSTEM_KSTAT_NAME)) == NULL) { in opl_disp_environ()
749 (void) kstat_close(kc); in opl_disp_environ()
753 if (kstat_read(kc, ksp, NULL) == -1) { in opl_disp_environ()
754 (void) kstat_close(kc); in opl_disp_environ()
760 (void) kstat_close(kc); in opl_disp_environ()
773 (void) kstat_close(kc); in opl_disp_environ()
/illumos-gate/usr/src/cmd/lockstat/
H A Dsym.c98 kstat_ctl_t *kc; in fake_up_certain_popular_kernel_symbols() local
102 if ((kc = kstat_open()) == NULL) in fake_up_certain_popular_kernel_symbols()
105 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in fake_up_certain_popular_kernel_symbols()
120 (void) kstat_close(kc); in fake_up_certain_popular_kernel_symbols()
/illumos-gate/usr/src/lib/libm/common/m9x/
H A Dtgammaf.c373 static const double kc[] = { variable
386 return (kc[0] + z * (kc[1] + z * kc[2] + (z * z) * kc[3])); in kpcos()
/illumos-gate/usr/src/cmd/svc/startd/
H A Dlog.c600 kstat_ctl_t *kc; in log_init() local
604 if (((kc = kstat_open()) != 0) && in log_init()
605 ((ks = kstat_lookup(kc, "unix", 0, "system_misc")) in log_init()
607 (kstat_read(kc, ks, NULL) != -1) && in log_init()
619 if (kc) in log_init()
620 (void) kstat_close(kc); in log_init()
/illumos-gate/usr/src/lib/libprtdiag/common/
H A Dkstat.c72 kstat_ctl_t *kc; in read_sun4u_kstats() local
76 if ((kc = kstat_open()) == NULL) { in read_sun4u_kstats()
/illumos-gate/usr/src/cmd/fs.d/nfs/umount/
H A Dumount.c361 kstat_ctl_t *kc = NULL; /* libkstat cookie */ in is_v4_mount() local
368 if ((kc = kstat_open()) == NULL) in is_v4_mount()
371 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in is_v4_mount()
381 if (kstat_read(kc, ksp, &mik) == -1) in is_v4_mount()

123