/illumos-gate/usr/src/cmd/powertop/common/ |
H A D | battery.c | 69 kstat_ctl_t *kc = kstat_open(); local 71 if (kstat_lookup(kc, kstat_batt_mod[1], 0, NULL)) 74 if (kstat_lookup(kc, kstat_batt_mod[2], 0, NULL)) 79 (void) kstat_close(kc); 115 kstat_ctl_t *kc; local 119 kc = kstat_open(); 128 ksp = kstat_lookup(kc, kstat_batt_mod[kstat_batt_idx], 0, 132 (void) kstat_close(kc); 136 (void) kstat_read(kc, ksp, NULL); 140 (void) kstat_close(kc); [all...] |
H A D | turbo.c | 65 kstat_ctl_t *kc; local 72 if ((kc = kstat_open()) == NULL) { 77 ksp = kstat_lookup(kc, "turbo", 0, NULL); 80 (void) kstat_close(kc); 84 (void) kstat_read(kc, ksp, NULL); 90 (void) kstat_close(kc); 103 (void) kstat_close(kc); 114 kstat_ctl_t *kc; local 120 if ((kc = kstat_open()) == NULL) 125 ksp = kstat_lookup(kc, "turb [all...] |
H A D | cpufreq.c | 165 kstat_ctl_t *kc; local 186 if ((kc = kstat_open()) == NULL) 189 ksp = kstat_lookup(kc, "cpu_info", g_cpu_table[g_observed_cpu], NULL); 193 (void) kstat_close(kc); 197 (void) kstat_read(kc, ksp, NULL); 223 (void) kstat_close(kc); 374 kstat_ctl_t *kc; local 378 if ((kc = kstat_open()) == NULL) 383 ret = pt_cpufreq_snapshot_cpu(kc, g_observed_cpu); 388 if ((ret = pt_cpufreq_snapshot_cpu(kc, 400 pt_cpufreq_snapshot_cpu(kstat_ctl_t *kc, uint_t cpu) argument [all...] |
/illumos-gate/usr/src/cmd/avs/dsstat/ |
H A D | multi_stats.c | 87 kstat_ctl_t *kc; local 89 if ((kc = kstat_open()) == NULL) 93 sdbc_err = sdbc_discover(kc); 102 sndr_err = sndr_discover(kc); 111 ii_err = ii_discover(kc); 119 (void) kstat_close(kc); 126 (void) kstat_close(kc); 139 kstat_ctl_t *kc; local 141 if ((kc = kstat_open()) == NULL) 145 sdbc_err = sdbc_update(kc); [all...] |
H A D | ii_stats.c | 64 ii_discover(kstat_ctl_t *kc) argument 71 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { 84 if (kstat_read(kc, ksp, NULL) == -1) 123 iistat->pre_set = kstat_retrieve(kc, ksp); 135 mst_ksp = kstat_lookup(kc, II_KSTAT_MODULE, -1, kname); 136 iistat->pre_mst = kstat_retrieve(kc, mst_ksp); 148 shd_ksp = kstat_lookup(kc, II_KSTAT_MODULE, -1, kname); 149 iistat->pre_shd = kstat_retrieve(kc, shd_ksp); 161 bmp_ksp = kstat_lookup(kc, II_KSTAT_MODULE, -1, kname); 162 iistat->pre_bmp = kstat_retrieve(kc, bmp_ks 211 ii_update(kstat_ctl_t *kc) argument [all...] |
H A D | sndr_stats.c | 75 sndr_discover(kstat_ctl_t *kc) argument 87 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { 101 if (kstat_read(kc, ksp, NULL) == -1) 141 sndrstat->pre_set = kstat_retrieve(kc, ksp); 153 bmp_ksp = kstat_lookup(kc, RDC_KSTAT_BMPNAME, kinst, kname); 154 sndrstat->pre_bmp = kstat_retrieve(kc, bmp_ksp); 166 sec_ksp = kstat_lookup(kc, RDC_KSTAT_MODULE, kinst, kname); 167 sndrstat->pre_sec = kstat_retrieve(kc, sec_ksp); 231 sndr_update(kstat_ctl_t *kc) argument 269 ksp = kstat_lookup(kc, RDC_KSTAT_MODUL [all...] |
/illumos-gate/usr/src/lib/libkstat/common/ |
H A D | kstat.c | 52 kstat_chain_free(kstat_ctl_t *kc) argument 56 ksp = kc->kc_chain; 63 kc->kc_chain = NULL; 64 kc->kc_chain_id = 0; 70 kstat_ctl_t *kc; local 76 kstat_zalloc((void **)&kc, sizeof (kstat_ctl_t), 0); 77 if (kc == NULL) 80 kc->kc_kd = kd; 81 kc->kc_chain = NULL; 82 kc 93 kstat_close(kstat_ctl_t *kc) argument 104 kstat_read(kstat_ctl_t *kc, kstat_t *ksp, void *data) argument 169 kstat_write(kstat_ctl_t *kc, kstat_t *ksp, void *data) argument 219 kstat_chain_update(kstat_ctl_t *kc) argument 301 kstat_lookup(kstat_ctl_t *kc, char *ks_module, int ks_instance, char *ks_name) argument [all...] |
/illumos-gate/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/ |
H A D | piclkstat.c | 65 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; local 100 if ((kc = kstat_open()) == NULL) { 103 rc = port_state[port_type](kc, driver_name, driver_instance); 104 kstat_close(kc); 119 kstat_ctl_t *kc = NULL; local 124 if ((kc 136 kstat_name_lookup(kstat_ctl_t *kc, char *ks_module, int ks_instance, char *name) argument 168 kstat_network_port_state(kstat_ctl_t *kc, char *ks_module, int ks_instance) argument 203 kstat_network_port_cond(kstat_ctl_t *kc, char *ks_module, int ks_instance) argument 333 serial_port_state(kstat_ctl_t *kc, char *driver, int instance) argument 382 serial_port_cond(kstat_ctl_t *kc, char *driver, int instance) argument 397 parallel_port_state(kstat_ctl_t *kc, char *ks_module, int ks_instance) argument 425 parallel_port_cond(kstat_ctl_t *kc, char *ks_module, int ks_instance) argument [all...] |
/illumos-gate/usr/src/lib/libfakekernel/common/ |
H A D | kmem.c | 107 kmem_cache_destroy(kmem_cache_t *kc) argument 109 umem_cache_destroy((umem_cache_t *)kc); 113 kmem_cache_alloc(kmem_cache_t *kc, int kmflags) argument 115 return (umem_cache_alloc((umem_cache_t *)kc, 120 kmem_cache_free(kmem_cache_t *kc, void *p) argument 122 umem_cache_free((umem_cache_t *)kc, p); 127 kmem_cache_set_move(kmem_cache_t *kc, argument 134 kmem_cache_reap_now(kmem_cache_t *kc) argument
|
/illumos-gate/usr/src/lib/libprtdiag/common/ |
H A D | kstat.c | 67 kstat_ctl_t *kc; local 76 if ((kc = kstat_open()) == NULL) { 92 ksp = kstat_lookup(kc, UNIX, board, FHC_KSTAT_NAME); 95 if ((ksp != NULL) && (kstat_read(kc, ksp, NULL) == -1)) { 126 ksp = kstat_lookup(kc, UNIX, board, AC_KSTAT_NAME); 129 if ((ksp != NULL) && (kstat_read(kc, ksp, NULL) == -1)) { 187 ksp = kstat_lookup(kc, UNIX, board, SIMMSTAT_KSTAT_NAME); 190 if (kstat_read(kc, ksp, NULL) == -1) { 200 ksp = kstat_lookup(kc, UNIX, board, OVERTEMP_KSTAT_NAME); 203 if (kstat_read(kc, ks 393 kstat_ctl_t *kc; local [all...] |
/illumos-gate/usr/src/cmd/sendmail/libsm/ |
H A D | memstat.c | 93 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)
|
/illumos-gate/usr/src/cmd/stat/common/ |
H A D | acquire.c | 52 kstat_lookup_read(kstat_ctl_t *kc, char *module, argument 55 kstat_t *ksp = kstat_lookup(kc, module, instance, name); 58 if (kstat_read(kc, ksp, NULL) == -1) 70 acquire_cpus(struct snapshot *ss, kstat_ctl_t *kc) argument 89 if ((ksp = kstat_lookup_read(kc, "cpu_info", i, NULL)) == NULL) 99 if ((ksp = kstat_lookup_read(kc, "cpu", i, "vm")) == NULL) 105 if ((ksp = kstat_lookup_read(kc, "cpu", i, "sys")) == NULL) 184 acquire_intrs(struct snapshot *ss, kstat_ctl_t *kc) argument 194 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { 203 sys_misc = kstat_lookup_read(kc, "uni 243 acquire_sys(struct snapshot *ss, kstat_ctl_t *kc) argument 300 acquire_snapshot(kstat_ctl_t *kc, int types, struct iodev_filter *iodev_filter) argument 393 kstat_ctl_t *kc; local [all...] |
/illumos-gate/usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/ |
H A D | iod_main.c | 111 kstat_ctl_t *kc; local 115 if ((kc = kstat_open()) == NULL) 118 for (ksp = kc->kc_chain; ksp != NULL; ksp = ksp->ks_next) { 122 if (kstat_read(kc, ksp, NULL) == -1) { 123 (void) kstat_close(kc); 135 (void) kstat_close(kc); 141 (void) kstat_close(kc);
|
/illumos-gate/usr/src/cmd/fs.d/nfs/nfsstat/ |
H A D | nfsstat.c | 71 static kstat_ctl_t *kc = NULL; /* libkstat cookie */ variable 324 kstat_close(kc); 336 safe_kstat_read(kc, rpc_clts_client_kstat, NULL); 341 safe_kstat_read(kc, rpc_cots_client_kstat, NULL); 346 safe_kstat_read(kc, rpc_rdma_client_kstat, NULL); 351 safe_kstat_read(kc, rpc_clts_server_kstat, NULL); 355 safe_kstat_read(kc, rpc_cots_server_kstat, NULL); 359 safe_kstat_read(kc, rpc_rdma_server_kstat, NULL); 371 safe_kstat_read(kc, nfs_client_kstat, NULL); 375 safe_kstat_read(kc, nfs4_client_ksta 1321 safe_kstat_read(kstat_ctl_t *kc, kstat_t *ksp, void *data) argument 1331 safe_kstat_write(kstat_ctl_t *kc, kstat_t *ksp, void *data) argument [all...] |
/illumos-gate/usr/src/cmd/hal/hald/solaris/ |
H A D | devinfo_cpu.c | 54 kstat_ctl_t *kc; local 184 kc = kstat_open (); 185 if (kc == NULL) { 191 ksp = kstat_lookup (kc, "cpu_info", cpu_id, NULL); 195 if (kc) { 196 kstat_close (kc); 201 kstat_read (kc, ksp, NULL); 241 if (kc) { 242 kstat_close (kc);
|
/illumos-gate/usr/src/cmd/sa/ |
H A D | sadc.c | 68 static kstat_ctl_t *kc; /* libkstat cookie */ variable 210 if ((kc = kstat_open()) == NULL) 288 (void) kstat_chain_update(kc); 329 sysinfo_ksp = safe_kstat_lookup(kc, "unix", 0, "sysinfo"); 330 vminfo_ksp = safe_kstat_lookup(kc, "unix", 0, "vminfo"); 331 kmem_oversize_ksp = safe_kstat_lookup(kc, "vmem", -1, "kmem_oversize"); 332 var_ksp = safe_kstat_lookup(kc, "unix", 0, "var"); 333 system_misc_ksp = safe_kstat_lookup(kc, "unix", 0, "system_misc"); 334 file_cache_ksp = safe_kstat_lookup(kc, "unix", 0, "file_cache"); 335 ufs_inode_ksp = kstat_lookup(kc, "uf 540 safe_kstat_read(kstat_ctl_t *kc, kstat_t *ksp, void *data) argument 550 safe_kstat_lookup(kstat_ctl_t *kc, char *ks_module, int ks_instance, char *ks_name) argument [all...] |
/illumos-gate/usr/src/cmd/power/ |
H A D | sysstat.c | 49 static kstat_ctl_t *kc; /* libkstat cookie */ variable 128 if ((kc = kstat_open()) == NULL) { 205 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { 260 if (kstat_read(kc, disk->ks, 276 while (kstat_chain_update(kc) || diskinfo_load()) { 303 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { 313 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { 316 kstat_read(kc, ksp, NULL) != -1) 337 if (kstat_read(kc, cpu_stats_list[i], NULL) == -1) 366 while (kstat_chain_update(kc) || cpu_stats_loa [all...] |
/illumos-gate/usr/src/cmd/fm/schemes/cpu/ |
H A D | cpu.c | 76 kstat_ctl_t *kc; local 78 if ((kc = kstat_open()) == NULL) 80 ksp = kstat_lookup(kc, "cpu_info", cpuid, NULL); 81 (void) kstat_close(kc); 95 kstat_ctl_t *kc; local 99 if ((kc = kstat_open()) == NULL) 102 if ((ksp = kstat_lookup(kc, "cpu_info", cpuid, NULL)) == NULL) { 103 (void) kstat_close(kc); 107 if (kstat_read(kc, ksp, NULL) == -1) { 109 (void) kstat_close(kc); [all...] |
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/netstat/ |
H A D | unix.c | 75 unixpr(kstat_ctl_t *kc) argument 79 if (kc == NULL) { /* sanity check. */ 85 if ((ksp = kstat_lookup(kc, "sockfs", 0, "sock_unix_list")) == 90 if (kstat_read(kc, ksp, NULL) == -1) {
|
/illumos-gate/usr/src/lib/sun_sas/common/ |
H A D | Sun_sasGetPhyStatistics.c | 41 kstat_ctl_t *kc; local 186 kc = kstat_open(); 187 if (kc == NULL) { 194 ksp = kstat_lookup(kc, NULL, -1, kstat_name); 201 (void) kstat_close(kc); 205 if (kstat_read(kc, ksp, NULL) == -1) { 211 (void) kstat_close(kc); 255 (void) kstat_close(kc);
|
/illumos-gate/usr/src/uts/common/inet/ip/ |
H A D | keysock.c | 484 keysock_consumer_t *kc; local 496 kc = (keysock_consumer_t *)ptr; 497 keystack = kc->kc_keystack; 500 kc->kc_sa_type)); 503 * can inspect KC_FLUSHING w/o locking down kc->kc_lock. 505 if (kc->kc_flags & KC_FLUSHING) { 529 keystack->keystack_consumers[kc->kc_sa_type] = NULL; 531 mutex_destroy(&kc->kc_lock); 532 netstack_rele(kc->kc_keystack->keystack_netstack); 565 keysock_consumer_t *kc; local 1030 keysock_consumer_t *kc; local 1851 keysock_consumer_t *kc = (keysock_consumer_t *)q->q_ptr; local 1914 keysock_link_consumer(uint8_t satype, keysock_consumer_t *kc) argument 1962 keysock_out_err(keysock_consumer_t *kc, int ks_errno, mblk_t *mp) argument 2010 keysock_passup(mblk_t *mp, sadb_msg_t *samsg, minor_t serial, keysock_consumer_t *kc, boolean_t persistent, keysock_stack_t *keystack) argument 2278 keysock_consumer_t *kc = (keysock_consumer_t *)q->q_ptr; local [all...] |
/illumos-gate/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/ |
H A D | cmd_cpu_arch.c | 162 kstat_ctl_t *kc; local 166 if ((kc = kstat_open()) == NULL) 169 if ((ksp = kstat_lookup(kc, "cpu_info", cpuid, NULL)) == NULL || 170 kstat_read(kc, ksp, NULL) == -1) { 172 (void) kstat_close(kc); 181 (void) kstat_close(kc); 186 (void) kstat_close(kc);
|
/illumos-gate/usr/src/uts/common/sys/lvm/ |
H A D | md_sp.h | 140 #define SPPS_FREE(kc, ps) \ 145 kmem_cache_free((kc), (ps)); \
|
H A D | md_stripe.h | 124 #define SPS_FREE(kc, ps) \ 129 kmem_cache_free((kc), (ps)); \
|
/illumos-gate/usr/src/lib/libprtdiag_psr/sparc/montecarlo/common/ |
H A D | montecarlo.c | 549 kstat_ctl_t *kc; local 561 if (!(kc = kstat_open())) { 568 kc = kc; 571 if ((ksp_leddata = kstat_lookup(kc, SCSB_DEV, 0, SCSB_KS_LEDDATA)) 578 if (kstat_read(kc, ksp_leddata, NULL) == -1) { 595 if ((ksp_state = kstat_lookup(kc, SCSB_DEV, 0, SCSB_KS_STATE)) 602 if (kstat_read(kc, ksp_state, NULL) == -1) { 633 if ((ksp_topo = kstat_lookup(kc, SCSB_DEV, 0, SCSB_KS_TOPOLOGY)) 640 if (kstat_read(kc, ksp_top 866 kstat_ctl_t *kc; local 948 kstat_ctl_t *kc; local 1066 kstat_ctl_t *kc; local [all...] |