Home
last modified time | relevance | path

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

123

/titanic_44/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 …]
/titanic_44/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/
H A Dpiclkstat.c65 static int kstat_network_port_state(kstat_ctl_t *kc, char *, int);
66 static int kstat_network_port_cond(kstat_ctl_t *kc, char *, int);
68 static int serial_port_cond(kstat_ctl_t *kc, char *, int);
70 static int parallel_port_cond(kstat_ctl_t *kc, char *, int);
94 kstat_ctl_t *kc = NULL; in kstat_port_state() local
100 if ((kc = kstat_open()) == NULL) { in kstat_port_state()
103 rc = port_state[port_type](kc, driver_name, driver_instance); in kstat_port_state()
104 kstat_close(kc); in kstat_port_state()
119 kstat_ctl_t *kc = NULL; in kstat_port_cond() local
124 if ((kc = kstat_open()) == NULL) { in kstat_port_cond()
[all …]
/titanic_44/usr/src/lib/libkstat/common/
H A Dkstat.c52 kstat_chain_free(kstat_ctl_t *kc) in kstat_chain_free() argument
56 ksp = kc->kc_chain; in kstat_chain_free()
63 kc->kc_chain = NULL; in kstat_chain_free()
64 kc->kc_chain_id = 0; in kstat_chain_free()
70 kstat_ctl_t *kc; in kstat_open() local
76 kstat_zalloc((void **)&kc, sizeof (kstat_ctl_t), 0); in kstat_open()
77 if (kc == NULL) in kstat_open()
80 kc->kc_kd = kd; in kstat_open()
81 kc->kc_chain = NULL; in kstat_open()
82 kc->kc_chain_id = 0; in kstat_open()
[all …]
/titanic_44/usr/src/lib/libprtdiag/common/
H A Dkstat.c67 kstat_ctl_t *kc; in read_platform_kstats() local
76 if ((kc = kstat_open()) == NULL) { in read_platform_kstats()
92 ksp = kstat_lookup(kc, UNIX, board, FHC_KSTAT_NAME); in read_platform_kstats()
95 if ((ksp != NULL) && (kstat_read(kc, ksp, NULL) == -1)) { in read_platform_kstats()
126 ksp = kstat_lookup(kc, UNIX, board, AC_KSTAT_NAME); in read_platform_kstats()
129 if ((ksp != NULL) && (kstat_read(kc, ksp, NULL) == -1)) { in read_platform_kstats()
187 ksp = kstat_lookup(kc, UNIX, board, SIMMSTAT_KSTAT_NAME); in read_platform_kstats()
190 if (kstat_read(kc, ksp, NULL) == -1) { in read_platform_kstats()
200 ksp = kstat_lookup(kc, UNIX, board, OVERTEMP_KSTAT_NAME); in read_platform_kstats()
203 if (kstat_read(kc, ksp, NULL) == -1) { in read_platform_kstats()
[all …]
/titanic_44/usr/src/cmd/avs/dsstat/
H A Dmulti_stats.c87 kstat_ctl_t *kc; in discover() local
89 if ((kc = kstat_open()) == NULL) in discover()
93 sdbc_err = sdbc_discover(kc); in discover()
102 sndr_err = sndr_discover(kc); in discover()
111 ii_err = ii_discover(kc); in discover()
119 (void) kstat_close(kc); in discover()
126 (void) kstat_close(kc); in discover()
139 kstat_ctl_t *kc; in update() local
141 if ((kc = kstat_open()) == NULL) in update()
145 sdbc_err = sdbc_update(kc); in update()
[all …]
H A Dii_stats.c64 ii_discover(kstat_ctl_t *kc) in ii_discover() argument
71 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in ii_discover()
84 if (kstat_read(kc, ksp, NULL) == -1) in ii_discover()
123 iistat->pre_set = kstat_retrieve(kc, ksp); in ii_discover()
135 mst_ksp = kstat_lookup(kc, II_KSTAT_MODULE, -1, kname); in ii_discover()
136 iistat->pre_mst = kstat_retrieve(kc, mst_ksp); in ii_discover()
148 shd_ksp = kstat_lookup(kc, II_KSTAT_MODULE, -1, kname); in ii_discover()
149 iistat->pre_shd = kstat_retrieve(kc, shd_ksp); in ii_discover()
161 bmp_ksp = kstat_lookup(kc, II_KSTAT_MODULE, -1, kname); in ii_discover()
162 iistat->pre_bmp = kstat_retrieve(kc, bmp_ksp); in ii_discover()
[all …]
H A Dsdbc_stats.c63 sdbc_discover(kstat_ctl_t *kc) in sdbc_discover() argument
69 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in sdbc_discover()
80 if (kstat_read(kc, ksp, NULL) == -1) in sdbc_discover()
119 sdbcstat->pre_set = kstat_retrieve(kc, ksp); in sdbc_discover()
131 io_ksp = kstat_lookup(kc, SDBC_KSTAT_MODULE, kinst, kname); in sdbc_discover()
132 sdbcstat->pre_io = kstat_retrieve(kc, io_ksp); in sdbc_discover()
165 sdbc_update(kstat_ctl_t *kc) in sdbc_update() argument
171 ksp = kstat_lookup(kc, SDBC_KSTAT_MODULE, -1, SDBC_KSTAT_GSTATS); in sdbc_update()
179 sdbc_global = kstat_retrieve(kc, ksp); in sdbc_update()
206 set_ksp = kstat_lookup(kc, SDBC_KSTAT_MODULE, kinst, kname); in sdbc_update()
[all …]
H A Dsndr_stats.c75 sndr_discover(kstat_ctl_t *kc) in sndr_discover() argument
87 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in sndr_discover()
101 if (kstat_read(kc, ksp, NULL) == -1) in sndr_discover()
141 sndrstat->pre_set = kstat_retrieve(kc, ksp); in sndr_discover()
153 bmp_ksp = kstat_lookup(kc, RDC_KSTAT_BMPNAME, kinst, kname); in sndr_discover()
154 sndrstat->pre_bmp = kstat_retrieve(kc, bmp_ksp); in sndr_discover()
166 sec_ksp = kstat_lookup(kc, RDC_KSTAT_MODULE, kinst, kname); in sndr_discover()
167 sndrstat->pre_sec = kstat_retrieve(kc, sec_ksp); in sndr_discover()
231 sndr_update(kstat_ctl_t *kc) in sndr_update() argument
269 ksp = kstat_lookup(kc, RDC_KSTAT_MODULE, kinst, kname); in sndr_update()
[all …]
/titanic_44/usr/src/cmd/fs.d/nfs/nfsstat/
H A Dnfsstat.c70 static kstat_ctl_t *kc = NULL; /* libkstat cookie */ variable
323 kstat_close(kc); in main()
335 safe_kstat_read(kc, rpc_clts_client_kstat, NULL); in getstats_rpc()
340 safe_kstat_read(kc, rpc_cots_client_kstat, NULL); in getstats_rpc()
345 safe_kstat_read(kc, rpc_rdma_client_kstat, NULL); in getstats_rpc()
350 safe_kstat_read(kc, rpc_clts_server_kstat, NULL); in getstats_rpc()
354 safe_kstat_read(kc, rpc_cots_server_kstat, NULL); in getstats_rpc()
358 safe_kstat_read(kc, rpc_rdma_server_kstat, NULL); in getstats_rpc()
370 safe_kstat_read(kc, nfs_client_kstat, NULL); in getstats_nfs()
374 safe_kstat_read(kc, nfs4_client_kstat, NULL); in getstats_nfs()
[all …]
/titanic_44/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 …]
/titanic_44/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 …]
/titanic_44/usr/src/lib/libfakekernel/common/
H A Dkmem.c107 kmem_cache_destroy(kmem_cache_t *kc) in kmem_cache_destroy() argument
109 umem_cache_destroy((umem_cache_t *)kc); in kmem_cache_destroy()
113 kmem_cache_alloc(kmem_cache_t *kc, int kmflags) in kmem_cache_alloc() argument
115 return (umem_cache_alloc((umem_cache_t *)kc, in kmem_cache_alloc()
120 kmem_cache_free(kmem_cache_t *kc, void *p) in kmem_cache_free() argument
122 umem_cache_free((umem_cache_t *)kc, p); in kmem_cache_free()
127 kmem_cache_set_move(kmem_cache_t *kc, in kmem_cache_set_move() argument
134 kmem_cache_reap_now(kmem_cache_t *kc) in kmem_cache_reap_now() argument
/titanic_44/usr/src/cmd/power/
H A Dsysstat.c49 static kstat_ctl_t *kc; /* libkstat cookie */ variable
128 if ((kc = kstat_open()) == NULL) { in sysstat_init()
205 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in init_disks()
260 if (kstat_read(kc, disk->ks, in diskinfo_load()
276 while (kstat_chain_update(kc) || diskinfo_load()) { in check_disks()
303 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in cpu_stats_init()
313 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in cpu_stats_init()
316 kstat_read(kc, ksp, NULL) != -1) in cpu_stats_init()
337 if (kstat_read(kc, cpu_stats_list[i], NULL) == -1) in cpu_stats_load()
366 while (kstat_chain_update(kc) || cpu_stats_load()) { in check_tty()
[all …]
/titanic_44/usr/src/cmd/sendmail/libsm/
H A Dmemstat.c93 static kstat_ctl_t *kc;
111 kc = kstat_open();
112 if (kc == NULL)
114 kst = kstat_lookup(kc, "unix", 0,
136 if (kc == NULL)
138 r = kstat_close(kc);
164 if (kc == NULL || kst == NULL)
166 if (kstat_read(kc, kst, NULL) == -1)
/titanic_44/usr/src/cmd/hal/hald/solaris/
H A Ddevinfo_cpu.c54 kstat_ctl_t *kc; in devinfo_cpu_add() local
184 kc = kstat_open (); in devinfo_cpu_add()
185 if (kc == NULL) { in devinfo_cpu_add()
191 ksp = kstat_lookup (kc, "cpu_info", cpu_id, NULL); in devinfo_cpu_add()
195 if (kc) { in devinfo_cpu_add()
196 kstat_close (kc); in devinfo_cpu_add()
201 kstat_read (kc, ksp, NULL); in devinfo_cpu_add()
241 if (kc) { in devinfo_cpu_add()
242 kstat_close (kc); in devinfo_cpu_add()
/titanic_44/usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/
H A Diod_main.c111 kstat_ctl_t *kc; in iod_cpu_check_support() local
115 if ((kc = kstat_open()) == NULL) in iod_cpu_check_support()
118 for (ksp = kc->kc_chain; ksp != NULL; ksp = ksp->ks_next) { in iod_cpu_check_support()
122 if (kstat_read(kc, ksp, NULL) == -1) { in iod_cpu_check_support()
123 (void) kstat_close(kc); in iod_cpu_check_support()
135 (void) kstat_close(kc); in iod_cpu_check_support()
141 (void) kstat_close(kc); in iod_cpu_check_support()
/titanic_44/usr/src/uts/common/inet/ip/
H A Dkeysock.c484 keysock_consumer_t *kc; in keysock_close() local
496 kc = (keysock_consumer_t *)ptr; in keysock_close()
497 keystack = kc->kc_keystack; in keysock_close()
500 kc->kc_sa_type)); in keysock_close()
505 if (kc->kc_flags & KC_FLUSHING) { in keysock_close()
529 keystack->keystack_consumers[kc->kc_sa_type] = NULL; in keysock_close()
531 mutex_destroy(&kc->kc_lock); in keysock_close()
532 netstack_rele(kc->kc_keystack->keystack_netstack); in keysock_close()
565 keysock_consumer_t *kc; in keysock_open() local
604 kc = kmem_zalloc(sizeof (keysock_consumer_t), KM_NOSLEEP); in keysock_open()
[all …]
/titanic_44/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 …]
/titanic_44/usr/src/lib/sun_sas/common/
H A DSun_sasGetPhyStatistics.c41 kstat_ctl_t *kc; in Sun_sasGetPhyStatistics() local
186 kc = kstat_open(); in Sun_sasGetPhyStatistics()
187 if (kc == NULL) { in Sun_sasGetPhyStatistics()
194 ksp = kstat_lookup(kc, NULL, -1, kstat_name); in Sun_sasGetPhyStatistics()
201 (void) kstat_close(kc); in Sun_sasGetPhyStatistics()
205 if (kstat_read(kc, ksp, NULL) == -1) { in Sun_sasGetPhyStatistics()
211 (void) kstat_close(kc); in Sun_sasGetPhyStatistics()
255 (void) kstat_close(kc); in Sun_sasGetPhyStatistics()
/titanic_44/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/
H A Dcmd_cpu_arch.c162 kstat_ctl_t *kc; in cmd_cpu_getfrustr_by_id() local
166 if ((kc = kstat_open()) == NULL) in cmd_cpu_getfrustr_by_id()
169 if ((ksp = kstat_lookup(kc, "cpu_info", cpuid, NULL)) == NULL || in cmd_cpu_getfrustr_by_id()
170 kstat_read(kc, ksp, NULL) == -1) { in cmd_cpu_getfrustr_by_id()
172 (void) kstat_close(kc); in cmd_cpu_getfrustr_by_id()
181 (void) kstat_close(kc); in cmd_cpu_getfrustr_by_id()
186 (void) kstat_close(kc); in cmd_cpu_getfrustr_by_id()
/titanic_44/usr/src/lib/libprtdiag_psr/sparc/montecarlo/common/
H A Dmontecarlo.c549 kstat_ctl_t *kc; in do_scsb_kstat() local
561 if (!(kc = kstat_open())) { in do_scsb_kstat()
568 kc = kc; in do_scsb_kstat()
571 if ((ksp_leddata = kstat_lookup(kc, SCSB_DEV, 0, SCSB_KS_LEDDATA)) in do_scsb_kstat()
578 if (kstat_read(kc, ksp_leddata, NULL) == -1) { in do_scsb_kstat()
595 if ((ksp_state = kstat_lookup(kc, SCSB_DEV, 0, SCSB_KS_STATE)) in do_scsb_kstat()
602 if (kstat_read(kc, ksp_state, NULL) == -1) { in do_scsb_kstat()
633 if ((ksp_topo = kstat_lookup(kc, SCSB_DEV, 0, SCSB_KS_TOPOLOGY)) in do_scsb_kstat()
640 if (kstat_read(kc, ksp_topo, NULL) == -1) { in do_scsb_kstat()
866 kstat_ctl_t *kc; in do_pcf8574_kstat() local
[all …]
/titanic_44/usr/src/cmd/busstat/
H A Dbusstat.c63 static kstat_ctl_t *kc; /* libkstat cookie */ variable
120 if ((kc = kstat_open()) == NULL) { in main()
275 if ((cnt_ksp = kstat_lookup(kc, device, inst_num, "counters")) in print_evt()
282 if (kstat_read(kc, cnt_ksp, NULL) == FAIL) { in print_evt()
313 if (kstat_read(kc, pic_ksp, NULL) == FAIL) { in print_evt()
357 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in print_dev()
626 if ((cnt_ksp = kstat_lookup(kc, dev_name, in add_dev_node()
634 if (kstat_read(kc, cnt_ksp, NULL) == FAIL) { in add_dev_node()
708 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in add_all_dev_node()
784 if (kstat_read(kc, pic_ksp, NULL) == FAIL) { in modify_evt_node()
[all …]
/titanic_44/usr/src/cmd/cmd-inet/usr.bin/netstat/
H A Dunix.c75 unixpr(kstat_ctl_t *kc) in unixpr() argument
79 if (kc == NULL) { /* sanity check. */ in unixpr()
85 if ((ksp = kstat_lookup(kc, "sockfs", 0, "sock_unix_list")) == in unixpr()
90 if (kstat_read(kc, ksp, NULL) == -1) { in unixpr()

123