/illumos-gate/usr/src/cmd/busstat/ |
H A D | busstat.c | 344 kstat_t *ksp; in print_dev() local 359 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in print_dev() 368 ksp->ks_instance); in print_dev() 707 kstat_t *ksp; in add_all_dev_node() local 710 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in add_all_dev_node() 1274 kstat_t *ksp; in check_dr_ops() local 1295 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in check_dr_ops() 1441 kstat_t *ksp; in find_pic_kstat() local 1447 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in find_pic_kstat() 1449 (strcmp(ksp->ks_name, pic) == 0) && in find_pic_kstat() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/lib/nwamd/ |
H A D | ncu_phys.c | 73 kstat_t *ksp; in nwamd_get_link_state() local 84 if ((ksp = kstat_lookup(kcp, module, instance, "mac")) == NULL) { in nwamd_get_link_state() 92 if (kstat_read(kcp, ksp, NULL) == -1) in nwamd_get_link_state() 95 (void) dladm_kstat_value(ksp, "link_state", KSTAT_DATA_UINT32, in nwamd_get_link_state()
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/netstat/ |
H A D | netstat.c | 3037 kstat_t *ksp; in if_report() local 3081 kstat_named_value(ksp, in if_report() 3349 kstat_t *ksp; in if_report() local 3543 ksp, NULL); in if_report() 6751 kstat_t *ksp; in kmem_cache_stats() local 6756 for (ksp = kc->kc_chain; ksp != NULL; ksp = ksp->ks_next) { in kmem_cache_stats() 6794 ksp->ks_name + len); in kmem_cache_stats() 7407 if (ksp == NULL) in kstat_named_value() 7438 ksp->ks_name); in safe_kstat_read() 7739 kstat_t *ksp; in uds_report() local [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/in.routed/ |
H A D | if.c | 1906 kstat_named_value(kstat_t *ksp, char *name, uint32_t *value) in kstat_named_value() argument 1910 if (ksp == NULL) in kstat_named_value() 1913 if ((knp = kstat_data_lookup(ksp, name)) == NULL) { in kstat_named_value() 1928 kstat_t *ksp; in get_if_kstats() local 1944 if (((ksp = kstat_lookup(kc, "link", 0, phyi->phyi_name)) == NULL) && in get_if_kstats() 1945 ((ksp = kstat_lookup(kc, NULL, -1, phyi->phyi_name)) == NULL)) { in get_if_kstats() 1950 if (kstat_read(kc, ksp, NULL) == -1) { in get_if_kstats() 1955 if ((kstat_named_value(ksp, "ipackets", &newdata->ipackets) == -1) || in get_if_kstats() 1956 (kstat_named_value(ksp, "opackets", &newdata->opackets) == -1)) { in get_if_kstats() 1964 if ((kstat_named_value(ksp, "ierrors", in get_if_kstats() [all …]
|
/illumos-gate/usr/src/cmd/cpc/common/ |
H A D | cpustat.c | 800 kstat_t *ksp; in get_chipid() local 803 if ((ksp = kstat_lookup(kc, "cpu_info", cpuid, NULL)) == NULL) in get_chipid() 806 if (kstat_read(kc, ksp, NULL) == -1) { in get_chipid() 813 if ((k = (kstat_named_t *)kstat_data_lookup(ksp, "chip_id")) == NULL) { in get_chipid()
|
/illumos-gate/usr/src/cmd/dcs/sparc/sun4u/ |
H A D | ri_init.c | 744 kstat_t *ksp; in syscpus() local 765 for (i = 0, ksp = kc->kc_chain; ksp != NULL; ksp = ksp->ks_next) { in syscpus() 766 if (strcmp(ksp->ks_module, "cpu_info") == 0) { in syscpus() 767 cp[i++] = ksp->ks_instance; in syscpus()
|
/illumos-gate/usr/src/cmd/dladm/ |
H A D | dladm.c | 5902 kstat_t *ksp; in get_mac_stats() local 5918 if (ksp != NULL) in get_mac_stats() 5919 dladm_get_stats(kcp, ksp, stats); in get_mac_stats() 5929 kstat_t *ksp; in get_link_stats() local 5940 if (ksp != NULL) in get_link_stats() 5941 dladm_get_stats(kcp, ksp, stats); in get_link_stats() 5951 kstat_t *ksp; in query_kstat() local 5966 if (kstat_read(kcp, ksp, NULL) == -1) { in query_kstat() 8317 kstat_t *ksp; in print_bridge_stats() local 8350 kstat_read(kcp, ksp, NULL) != -1) { in print_bridge_stats() [all …]
|
/illumos-gate/usr/src/cmd/drd/ |
H A D | drd_rcm.c | 868 kstat_t *ksp; in get_sys_cpuids() local 885 for (ksp = kc->kc_chain; ksp != NULL; ksp = ksp->ks_next) { in get_sys_cpuids() 886 if (strcmp(ksp->ks_module, "cpu_info") == 0) in get_sys_cpuids() 887 cp[ncpu++] = ksp->ks_instance; in get_sys_cpuids()
|
/illumos-gate/usr/src/cmd/dtrace/demo/struct/ |
H A D | kstat.d | 35 this->ksp = (kstat_named_t *) copyin(arg1, sizeof (kstat_named_t)); 37 copyinstr(self->ksname), this->ksp->value.ui64);
|
/illumos-gate/usr/src/cmd/dtrace/test/tst/common/docsExamples/ |
H A D | kstat.d | 47 this->ksp = (kstat_named_t *)copyin(arg1, sizeof (kstat_named_t)); 48 printf("%s has ui64 value %u\n", this->str, this->ksp->value.ui64);
|
/illumos-gate/usr/src/cmd/fm/schemes/cpu/ |
H A D | cpu.c | 77 kstat_t *ksp = NULL; in cpu_cpuid_present() local 80 ksp = kstat_lookup(kc, "cpu_info", cpuid, NULL); in cpu_cpuid_present() 82 return ((ksp == NULL) ? 0 : 1); in cpu_cpuid_present() 96 kstat_t *ksp; in cpu_get_serialid_kstat() local 102 if ((ksp = kstat_lookup(kc, "cpu_info", cpuid, NULL)) == NULL) { in cpu_get_serialid_kstat() 107 if (kstat_read(kc, ksp, NULL) == -1) { in cpu_get_serialid_kstat() 113 for (kn = ksp->ks_data, i = 0; i < ksp->ks_ndata; i++, kn++) { in cpu_get_serialid_kstat()
|
/illumos-gate/usr/src/cmd/fs.d/autofs/ |
H A D | autod_nfs.c | 4051 kstat_t *ksp; in is_v4_mount() local 4067 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in is_v4_mount() 4068 if (ksp->ks_type != KSTAT_TYPE_RAW) in is_v4_mount() 4070 if (strcmp(ksp->ks_module, "nfs") != 0) in is_v4_mount() 4072 if (strcmp(ksp->ks_name, "mntinfo") != 0) in is_v4_mount() 4074 if (mnt_minor != ksp->ks_instance) in is_v4_mount() 4077 if (kstat_read(kc, ksp, &mik) == -1) in is_v4_mount()
|
/illumos-gate/usr/src/cmd/fs.d/nfs/nfsstat/ |
H A D | nfsstat.c | 1041 kstat_t *ksp; in mi_print() local 1137 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in mi_print() 1140 if (ksp->ks_type != KSTAT_TYPE_RAW) in mi_print() 1142 if (strcmp(ksp->ks_module, "nfs") != 0) in mi_print() 1144 if (strcmp(ksp->ks_name, "mntinfo") != 0) in mi_print() 1148 if ((mrp->my_fsid & MAXMIN) == ksp->ks_instance) in mi_print() 1154 if (safe_kstat_read(kc, ksp, &mik) == -1) in mi_print() 1323 kid_t kstat_chain_id = kstat_read(kc, ksp, data); in safe_kstat_read() 1335 if (ksp->ks_data != NULL) { in safe_kstat_write() 1336 kstat_chain_id = kstat_write(kc, ksp, data); in safe_kstat_write() [all …]
|
/illumos-gate/usr/src/cmd/fs.d/nfs/umount/ |
H A D | umount.c | 362 kstat_t *ksp; in is_v4_mount() local 371 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in is_v4_mount() 372 if (ksp->ks_type != KSTAT_TYPE_RAW) in is_v4_mount() 374 if (strcmp(ksp->ks_module, "nfs") != 0) in is_v4_mount() 376 if (strcmp(ksp->ks_name, "mntinfo") != 0) in is_v4_mount() 378 if (mntp->mnt_minor != ksp->ks_instance) in is_v4_mount() 381 if (kstat_read(kc, ksp, &mik) == -1) in is_v4_mount()
|
/illumos-gate/usr/src/cmd/fuser/ |
H A D | fuser.c | 143 kstat_t *ksp; in get_f_user_buf() local 147 (ksp = kstat_lookup(kc, "unix", 0, "var")) == NULL || in get_f_user_buf() 148 kstat_read(kc, ksp, &v) == -1) { in get_f_user_buf()
|
/illumos-gate/usr/src/cmd/hal/hald/solaris/ |
H A D | devinfo_cpu.c | 53 kstat_t *ksp; in devinfo_cpu_add() local 189 ksp = kstat_lookup (kc, "cpu_info", cpu_id, NULL); in devinfo_cpu_add() 190 if (ksp == NULL) { in devinfo_cpu_add() 199 kstat_read (kc, ksp, NULL); in devinfo_cpu_add() 200 ksdata = (kstat_named_t *)kstat_data_lookup (ksp, "clock_MHz"); in devinfo_cpu_add() 214 ksdata = (kstat_named_t *)kstat_data_lookup (ksp, in devinfo_cpu_add()
|
H A D | sysevent.c | 516 kstat_t *ksp; in sysevent_dr_remove_cpu() local 554 ksp = kstat_lookup (kc, "cpu_info", cpu_id, NULL); in sysevent_dr_remove_cpu() 555 if (ksp != NULL) { in sysevent_dr_remove_cpu()
|
/illumos-gate/usr/src/cmd/kvmstat/ |
H A D | kvmstat.c | 90 for (i = 0; i < ksp->ks_ndata; i++) { in kstat_field_hint() 96 field->ksf_name, ksp->ks_name, ksp->ks_instance); in kstat_field_hint() 126 kstat_t *ksp; in kstat_instances_update() local 138 for (ksp = kcp->kc_chain; ksp != NULL; ksp = ksp->ks_next) { in kstat_instances_update() 141 if (!interested(ksp)) in kstat_instances_update() 158 ksi->ksi_ksp = ksp; in kstat_instances_update() 172 ksi->ksi_ksp = ksp; in kstat_instances_update() 230 kstat_t *ksp = ksi->ksi_ksp; in kstat_instances_read() local 232 if (ksp == NULL) in kstat_instances_read() 340 interested(kstat_t *ksp) in interested() argument [all …]
|
/illumos-gate/usr/src/cmd/lockstat/ |
H A D | sym.c | 99 kstat_t *ksp; in fake_up_certain_popular_kernel_symbols() local 105 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in fake_up_certain_popular_kernel_symbols() 106 if (strcmp(ksp->ks_module, "cpu_info") == 0) { in fake_up_certain_popular_kernel_symbols() 113 if (ksp->ks_instance == 0) in fake_up_certain_popular_kernel_symbols() 114 remove_symbol((uintptr_t)ksp->ks_private); in fake_up_certain_popular_kernel_symbols() 115 (void) sprintf(name, "cpu[%d]", ksp->ks_instance); in fake_up_certain_popular_kernel_symbols() 116 add_symbol(name, (uintptr_t)ksp->ks_private, in fake_up_certain_popular_kernel_symbols()
|
/illumos-gate/usr/src/cmd/pools/poold/com/sun/solaris/service/kstat/ |
H A D | Kstat.java | 46 private long ksp; field in Kstat 48 Kstat(long kctl, long ksp) in Kstat() argument 51 this.ksp = ksp; in Kstat()
|
/illumos-gate/usr/src/cmd/pools/poold/libjkstat/ |
H A D | jkstat.c | 161 kstat_t *ksp = ((kstat_t *)(uintptr_t)(*env)->GetLongField(env, obj, in Java_com_sun_solaris_service_kstat_Kstat_read() local 165 if (!ksp || !kctl) in Java_com_sun_solaris_service_kstat_Kstat_read() 168 kid = kstat_read((kstat_ctl_t *)kctl, (kstat_t *)ksp, NULL); in Java_com_sun_solaris_service_kstat_Kstat_read() 191 kstat_t *ksp; in Java_com_sun_solaris_service_kstat_KstatCtl_lookup() local 204 ksp = kstat_lookup(kctl, (char *)module, instance, (char *)name); in Java_com_sun_solaris_service_kstat_KstatCtl_lookup() 205 if (ksp) in Java_com_sun_solaris_service_kstat_KstatCtl_lookup() 207 (jlong)(uintptr_t)kctl, (jlong)(uintptr_t)ksp); in Java_com_sun_solaris_service_kstat_KstatCtl_lookup() 249 switch (ksp->ks_type) { in Java_com_sun_solaris_service_kstat_Kstat_getValue() 251 ksnp = kstat_data_lookup(ksp, (char *)name); in Java_com_sun_solaris_service_kstat_Kstat_getValue() 310 if (!ksp) in ksobj_get_hrtime() [all …]
|
/illumos-gate/usr/src/cmd/pools/poolstat/ |
H A D | sa_kstat.c | 118 ksp->ks_name, name, get_errstr()); in safe_kstat_data_lookup() 176 sdata_new(kstat_t *ksp) in sdata_new() argument 181 kstat_clone(ksp, &sdp->sd_nks, 0); in sdata_new() 206 kstat_t *ksp; in update_sdata_list() local 209 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in update_sdata_list() 210 if (strcmp(ksp->ks_module, module) == 0 && in update_sdata_list() 213 if (kstat_read(kc, ksp, NULL) == -1) { in update_sdata_list() 225 if (ksp->ks_instance == in update_sdata_list() 233 kstat_clone(ksp, &sdp->sd_nks, 1); in update_sdata_list() 243 list = sdata_new(ksp); in update_sdata_list() [all …]
|
/illumos-gate/usr/src/cmd/power/ |
H A D | handlers.c | 230 kstat_t *ksp; in S3_helper() local 246 ksp = kstat_lookup(kc, "acpi", -1, "acpi"); in S3_helper() 247 if (ksp == NULL) { in S3_helper() 252 (void) kstat_read(kc, ksp, NULL); in S3_helper() 253 dp = kstat_data_lookup(ksp, "S3"); in S3_helper() 269 dp = kstat_data_lookup(ksp, "preferred_pm_profile"); in S3_helper()
|
H A D | sysstat.c | 89 (ksp), (name)))->value.ui64) 193 kstat_t *ksp; in init_disks() local 204 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in init_disks() 205 if (ksp->ks_type != KSTAT_TYPE_IO || in init_disks() 218 disk->ks = ksp; in init_disks() 299 kstat_t *ksp; in cpu_stats_init() local 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() 316 cpu_stats_list[ncpus++] = ksp; in cpu_stats_init() [all …]
|
/illumos-gate/usr/src/cmd/powertop/common/ |
H A D | battery.c | 116 kstat_t *ksp; in pt_battery_stat_snapshot() local 131 if (ksp == NULL) { in pt_battery_stat_snapshot() 136 (void) kstat_read(kc, ksp, NULL); in pt_battery_stat_snapshot() 154 if (ksp == NULL) { in pt_battery_stat_snapshot() 159 (void) kstat_read(kc, ksp, NULL); in pt_battery_stat_snapshot() 181 if (ksp == NULL) { in pt_battery_stat_snapshot() 186 (void) kstat_read(kc, ksp, NULL); in pt_battery_stat_snapshot() 203 if (ksp == NULL) { in pt_battery_stat_snapshot() 208 (void) kstat_read(kc, ksp, NULL); in pt_battery_stat_snapshot() 227 if (ksp == NULL) { in pt_battery_stat_snapshot() [all …]
|