/illumos-gate/usr/src/uts/common/io/bge/ |
H A D | bge_kstats.c | 200 kstat_named_t *knp; in bge_statistics_update() local 210 knp = ksp->ks_data; in bge_statistics_update() 221 for (ksip = bge_statistics; ksip->name != NULL; ++knp, ++ksip) in bge_statistics_update() 222 knp->value.ui64 = bstp->a[ksip->index]; in bge_statistics_update() 225 (knp++)->value.ui64 = (uint64_t)(pstats->ifHCOutOctets); in bge_statistics_update() 226 (knp++)->value.ui64 = (uint64_t)(pstats->etherStatsCollisions); in bge_statistics_update() 227 (knp++)->value.ui64 = (uint64_t)(pstats->outXonSent); in bge_statistics_update() 228 (knp++)->value.ui64 = (uint64_t)(pstats->outXoffSent); in bge_statistics_update() 229 (knp++)->value.ui64 = in bge_statistics_update() 231 (knp++)->value.ui64 = in bge_statistics_update() [all …]
|
/illumos-gate/usr/src/cmd/powertop/common/ |
H A D | battery.c | 117 kstat_named_t *knp; in pt_battery_stat_snapshot() local 137 knp = kstat_data_lookup(ksp, "bif_unit"); in pt_battery_stat_snapshot() 139 if (knp == NULL) { in pt_battery_stat_snapshot() 144 battery_state.power_unit = knp->value.ui32; in pt_battery_stat_snapshot() 160 knp = kstat_data_lookup(ksp, "bst_rate"); in pt_battery_stat_snapshot() 162 if (knp == NULL) { in pt_battery_stat_snapshot() 167 if (knp->value.ui32 == 0xFFFFFFFF) in pt_battery_stat_snapshot() 171 battery_state.present_rate = mW2W((double)(knp->value.ui32)); in pt_battery_stat_snapshot() 187 knp = kstat_data_lookup(ksp, "bif_last_cap"); in pt_battery_stat_snapshot() 189 if (knp == NULL) { in pt_battery_stat_snapshot() [all …]
|
H A D | turbo.c | 67 kstat_named_t *knp; in pt_turbo_init() local 86 knp = kstat_data_lookup(ksp, "turbo_supported"); in pt_turbo_init() 87 if (knp == NULL) { in pt_turbo_init() 97 if (knp->value.ui32) { in pt_turbo_init() 116 kstat_named_t *knp; in pt_turbo_snapshot() local 140 knp = kstat_data_lookup(ksp, "turbo_mcnt"); in pt_turbo_snapshot() 141 if (knp == NULL) { in pt_turbo_snapshot() 151 turbo_info->t_mcnt = knp->value.ui64; in pt_turbo_snapshot() 153 knp = kstat_data_lookup(ksp, "turbo_acnt"); in pt_turbo_snapshot() 154 if (knp == NULL) { in pt_turbo_snapshot() [all …]
|
H A D | cpufreq.c | 167 kstat_named_t *knp; in pt_cpufreq_stat_prepare() local 199 knp = kstat_data_lookup(ksp, "supported_frequencies_Hz"); in pt_cpufreq_stat_prepare() 200 s = knp->value.str.addr.ptr; in pt_cpufreq_stat_prepare() 403 kstat_named_t *knp; in pt_cpufreq_snapshot_cpu() local 418 knp = kstat_data_lookup(ksp, "current_clock_Hz"); in pt_cpufreq_snapshot_cpu() 419 if (knp == NULL) { in pt_cpufreq_snapshot_cpu() 425 g_cpu_power_states[cpu].current_pstate = HZ2MHZ(knp->value.ui64); in pt_cpufreq_snapshot_cpu()
|
/illumos-gate/usr/src/uts/common/io/rge/ |
H A D | rge_kstats.c | 63 kstat_named_t *knp; in rge_driverinfo_update() local 69 knp = ksp->ks_data; in rge_driverinfo_update() 71 (knp++)->value.ui64 = rgep->dma_area_rxdesc.cookie.dmac_laddress; in rge_driverinfo_update() 72 (knp++)->value.ui64 = rgep->rx_next; in rge_driverinfo_update() 73 (knp++)->value.ui64 = rgep->rx_free; in rge_driverinfo_update() 74 (knp++)->value.ui64 = rgep->rx_bcopy; in rge_driverinfo_update() 75 (knp++)->value.ui64 = rgep->dma_area_txdesc.cookie.dmac_laddress; in rge_driverinfo_update() 76 (knp++)->value.ui64 = rgep->tx_next; in rge_driverinfo_update() 77 (knp++)->value.ui64 = rgep->tx_free; in rge_driverinfo_update() 78 (knp++)->value.ui64 = rgep->tx_flow; in rge_driverinfo_update() [all …]
|
/illumos-gate/usr/src/uts/common/io/nge/ |
H A D | nge_kstats.c | 73 kstat_named_t *knp; in nge_statistics_update() local 82 knp = ksp->ks_data; in nge_statistics_update() 87 for (ksip = nge_statistics; ksip->name != NULL; ++knp, ++ksip) { in nge_statistics_update() 90 knp->value.ui64 = hw_stp->a[ksip->index]; in nge_statistics_update() 142 kstat_named_t *knp; in nge_chipinfo_update() local 150 knp = ksp->ks_data; in nge_chipinfo_update() 152 (knp++)->value.ui64 = infop->businfo; in nge_chipinfo_update() 153 (knp++)->value.ui64 = infop->command; in nge_chipinfo_update() 154 (knp++)->value.ui64 = infop->vendor; in nge_chipinfo_update() 155 (knp++)->value.ui64 = infop->device; in nge_chipinfo_update() [all …]
|
/illumos-gate/usr/src/uts/common/io/dls/ |
H A D | dls_stat.c | 64 kstat_named_t *knp; in dls_stat_update() local 71 knp = (kstat_named_t *)ksp->ks_data; in dls_stat_update() 77 knp->value.ui64 = val; in dls_stat_update() 80 knp->value.ui32 = (uint32_t)val; in dls_stat_update() 86 knp++; in dls_stat_update() 93 knp->value.ui32 = LINK_DUPLEX_UNKNOWN; in dls_stat_update() 96 knp->value.ui32 = (uint32_t)val; in dls_stat_update() 98 knp++; in dls_stat_update() 99 knp->value.ui32 = dlp->dl_unknowns; in dls_stat_update() 110 kstat_named_t *knp; in dls_stat_create() local [all …]
|
/illumos-gate/usr/src/uts/common/io/sfxge/ |
H A D | sfxge_mon.c | 71 kstat_named_t *knp; in sfxge_mon_kstat_update() local 91 knp = smp->sm_stat; in sfxge_mon_kstat_update() 95 knp->value.ui64 = smp->sm_statbuf[sn].emsv_value; in sfxge_mon_kstat_update() 96 knp++; in sfxge_mon_kstat_update() 100 knp->value.ui32 = sp->s_num_restarts; in sfxge_mon_kstat_update() 101 knp++; in sfxge_mon_kstat_update() 102 knp->value.ui32 = sp->s_num_restarts_hw_err; in sfxge_mon_kstat_update() 103 knp++; in sfxge_mon_kstat_update() 104 knp->value.ui32 = smp->sm_polling; in sfxge_mon_kstat_update() 105 knp++; in sfxge_mon_kstat_update() [all …]
|
H A D | sfxge_mac.c | 128 kstat_named_t *knp; in sfxge_mac_kstat_update() local 145 knp = smp->sm_stat; in sfxge_mac_kstat_update() 146 knp += EFX_MAC_NSTATS; in sfxge_mac_kstat_update() 148 knp->value.ui64 = (smp->sm_link_up) ? 1 : 0; in sfxge_mac_kstat_update() 149 knp++; in sfxge_mac_kstat_update() 151 knp->value.ui64 = smp->sm_link_speed; in sfxge_mac_kstat_update() 152 knp++; in sfxge_mac_kstat_update() 154 knp->value.ui64 = smp->sm_link_duplex; in sfxge_mac_kstat_update() 155 knp++; in sfxge_mac_kstat_update() 157 knp->value.ui64 = (smp->sm_fcntl & EFX_FCNTL_GENERATE) ? 1 : 0; in sfxge_mac_kstat_update() [all …]
|
H A D | sfxge_phy.c | 80 kstat_named_t *knp; in sfxge_phy_kstat_update() local 102 knp = spp->sp_stat; in sfxge_phy_kstat_update() 104 knp->value.ui64 = spp->sp_statbuf[sn]; in sfxge_phy_kstat_update() 105 knp++; in sfxge_phy_kstat_update() 109 knp->value.ui64 = encp->enc_port; in sfxge_phy_kstat_update() 129 kstat_named_t *knp; in sfxge_phy_kstat_init() local 161 spp->sp_stat = knp = ksp->ks_data; in sfxge_phy_kstat_init() 163 kstat_named_init(knp, (char *)efx_phy_stat_name(enp, id), in sfxge_phy_kstat_init() 165 knp++; in sfxge_phy_kstat_init() 168 kstat_named_init(knp, "port", KSTAT_DATA_UINT64); in sfxge_phy_kstat_init()
|
H A D | sfxge_rx.c | 1124 kstat_named_t *knp; in sfxge_rx_kstat_update() local 1136 knp = ksp->ks_data; in sfxge_rx_kstat_update() 1138 knp++->value.ui32 = srp->sr_kstat.srk_rx_pkt_mem_limit; in sfxge_rx_kstat_update() 1139 knp++->value.ui32 = srp->sr_kstat.srk_kcache_alloc_nomem; in sfxge_rx_kstat_update() 1140 knp++->value.ui32 = srp->sr_kstat.srk_dma_alloc_nomem; in sfxge_rx_kstat_update() 1141 knp++->value.ui32 = srp->sr_kstat.srk_dma_alloc_fail; in sfxge_rx_kstat_update() 1142 knp++->value.ui32 = srp->sr_kstat.srk_dma_bind_nomem; in sfxge_rx_kstat_update() 1143 knp++->value.ui32 = srp->sr_kstat.srk_dma_bind_fail; in sfxge_rx_kstat_update() 1144 knp++->value.ui32 = srp->sr_kstat.srk_desballoc_fail; in sfxge_rx_kstat_update() 1145 knp++->value.ui32 = srp->sr_kstat.srk_rxq_empty_discard; in sfxge_rx_kstat_update() [all …]
|
/illumos-gate/usr/src/uts/common/fs/hsfs/ |
H A D | hsfs_subr.c | 349 kstat_named_t *knp; in hsfs_kstats_update() local 361 knp = ksp->ks_data; in hsfs_kstats_update() 376 knp++; in hsfs_kstats_update() 377 (knp++)->value.ui64 = pages_lost; in hsfs_kstats_update() 378 (knp++)->value.ui64 = howmany(physical_read_bytes, PAGESIZE); in hsfs_kstats_update() 379 (knp++)->value.ui64 = cache_read_pages; in hsfs_kstats_update() 380 (knp++)->value.ui64 = howmany(readahead_bytes, PAGESIZE); in hsfs_kstats_update() 381 (knp++)->value.ui64 = howmany(coalesced_bytes, PAGESIZE); in hsfs_kstats_update() 382 (knp++)->value.ui64 = total_pages_requested; in hsfs_kstats_update() 396 kstat_named_t *knp; in hsfs_setup_named_kstats() local [all …]
|
/illumos-gate/usr/src/cmd/fs.d/nfs/nfsstat/ |
H A D | nfsstat.c | 549 kstat_named_t *knp; in req_width() local 553 knp = KSTAT_NAMED_PTR(req); in req_width() 555 tot += knp[i].value.ui64; in req_width() 557 knp = kstat_data_lookup(req, "null"); in req_width() 558 nreq = req->ks_ndata - (knp - KSTAT_NAMED_PTR(req)); in req_width() 561 len = strlen(knp[i].name) + 1; in req_width() 565 per = (int)(knp[i].value.ui64 * 100 / tot); in req_width() 569 knp[i].value.ui64, per); in req_width() 582 kstat_named_t *knp; in stat_width() local 584 knp = KSTAT_NAMED_PTR(req); in stat_width() [all …]
|
/illumos-gate/usr/src/cmd/psrinfo/ |
H A D | psrinfo.c | 543 kstat_named_t *knp; in main() local 596 if ((knp = kstat_data_lookup(ksp, "state")) != NULL) { in main() 597 vc->v_state = mystrdup(knp->value.c); in main() 602 if ((knp = kstat_data_lookup(ksp, "cpu_type")) != NULL) { in main() 603 vc->v_cpu_type = mystrdup(knp->value.c); in main() 605 if ((knp = kstat_data_lookup(ksp, "fpu_type")) != NULL) { in main() 606 vc->v_fpu_type = mystrdup(knp->value.c); in main() 609 if ((knp = kstat_data_lookup(ksp, "state_begin")) != NULL) { in main() 610 vc->v_state_begin = knp->value.l; in main() 613 if ((knp = kstat_data_lookup(ksp, "clock_MHz")) != NULL) { in main() [all …]
|
/illumos-gate/usr/src/uts/common/io/softmac/ |
H A D | softmac_stat.c | 228 kstat_named_t *knp; in softmac_get_kstat() local 238 for (i = 0, knp = KSTAT_NAMED_PTR(ksp); i < ksp->ks_ndata; i++, knp++) { in softmac_get_kstat() 239 if (strcmp(knp->name, name) == 0) { in softmac_get_kstat() 240 switch (knp->data_type) { in softmac_get_kstat() 243 *valp = (uint64_t)(knp->value.ui32); in softmac_get_kstat() 248 *valp = knp->value.ui64; in softmac_get_kstat() 254 *valp = (uint64_t)knp->value.ul; in softmac_get_kstat() 261 if (strncmp(knp->value.c, "full", 4) == 0) in softmac_get_kstat() 263 else if (strncmp(knp->value.c, "half", 4) == 0) in softmac_get_kstat()
|
/illumos-gate/usr/src/cmd/stat/iostat/ |
H A D | iostat.c | 798 kstat_named_t *knp; in show_disk() local 801 knp = KSTAT_NAMED_PTR(&new->is_errors); in show_disk() 803 switch (knp[i].data_type) { in show_disk() 806 err_counters[i] = knp[i].value.ui32; in show_disk() 807 toterrs += knp[i].value.ui32; in show_disk() 985 kstat_named_t *knp; in show_disk_errors() local 1011 knp = KSTAT_NAMED_PTR(&disk->is_errors); in show_disk_errors() 1014 if (knp[i].name[0] == 0) in show_disk_errors() 1017 col += strlen(knp[i].name); in show_disk_errors() 1019 switch (knp[i].data_type) { in show_disk_errors() [all …]
|
/illumos-gate/usr/src/uts/common/os/ |
H A D | kstat_fr.c | 595 kstat_named_setstr(kstat_named_t *knp, const char *src) in kstat_named_setstr() argument 597 if (knp->data_type != KSTAT_DATA_STRING) in kstat_named_setstr() 600 (void *)knp, (void *)src); in kstat_named_setstr() 602 KSTAT_NAMED_STR_PTR(knp) = (char *)src; in kstat_named_setstr() 604 KSTAT_NAMED_STR_BUFLEN(knp) = strlen(src) + 1; in kstat_named_setstr() 606 KSTAT_NAMED_STR_BUFLEN(knp) = 0; in kstat_named_setstr() 617 kstat_named_init(kstat_named_t *knp, const char *name, uchar_t data_type) in kstat_named_init() argument 619 kstat_set_string(knp->name, name); in kstat_named_init() 620 knp->data_type = data_type; in kstat_named_init() 623 kstat_named_setstr(knp, NULL); in kstat_named_init() [all …]
|
/illumos-gate/usr/src/uts/common/io/mac/ |
H A D | mac_stat.c | 302 kstat_named_t *knp = ksp->ks_data; in i_mac_driver_stat_update() local 326 knp->value.ui64 = val; in i_mac_driver_stat_update() 329 knp->value.ui32 = (uint32_t)val; in i_mac_driver_stat_update() 336 knp++; in i_mac_driver_stat_update() 343 i_mac_kstat_init(kstat_named_t *knp, mac_stat_info_t *si, uint_t count) in i_mac_kstat_init() argument 347 kstat_named_init(knp, si[i].msi_name, si[i].msi_type); in i_mac_kstat_init() 348 knp++; in i_mac_kstat_init() 356 kstat_named_t *knp = ksp->ks_data; in i_mac_stat_update() local 368 knp->value.ui64 = val; in i_mac_stat_update() 371 knp->value.ui32 = (uint32_t)val; in i_mac_stat_update() [all …]
|
/illumos-gate/usr/src/uts/common/xen/io/ |
H A D | xnb.c | 161 kstat_named_t *knp; in xnb_ks_aux_update() local 167 knp = ksp->ks_data; in xnb_ks_aux_update() 173 (knp++)->value.ui64 = xnbp->xnb_stat_rx_cksum_deferred; in xnb_ks_aux_update() 174 (knp++)->value.ui64 = xnbp->xnb_stat_tx_cksum_no_need; in xnb_ks_aux_update() 175 (knp++)->value.ui64 = xnbp->xnb_stat_rx_rsp_notok; in xnb_ks_aux_update() 176 (knp++)->value.ui64 = xnbp->xnb_stat_tx_notify_deferred; in xnb_ks_aux_update() 177 (knp++)->value.ui64 = xnbp->xnb_stat_tx_notify_sent; in xnb_ks_aux_update() 178 (knp++)->value.ui64 = xnbp->xnb_stat_rx_notify_deferred; in xnb_ks_aux_update() 179 (knp++)->value.ui64 = xnbp->xnb_stat_rx_notify_sent; in xnb_ks_aux_update() 180 (knp++)->value.ui64 = xnbp->xnb_stat_tx_too_early; in xnb_ks_aux_update() [all …]
|
H A D | blk_common.c | 278 kstat_named_t *knp; in blk_kstat_init() local 290 knp = ring->ri_kstats->ks_data; in blk_kstat_init() 292 kstat_named_init(knp, *cp, KSTAT_DATA_UINT64); in blk_kstat_init() 293 knp++; in blk_kstat_init() 320 kstat_named_t *knp; in blk_kstat_update() local 331 knp = ksp->ks_data; in blk_kstat_update() 337 (knp++)->value.ui64 = stats->bs_req_reads; in blk_kstat_update() 338 (knp++)->value.ui64 = stats->bs_req_writes; in blk_kstat_update() 339 (knp++)->value.ui64 = stats->bs_req_barriers; in blk_kstat_update() 340 (knp++)->value.ui64 = stats->bs_req_flushes; in blk_kstat_update() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ilbadm/ |
H A D | ilbadm_stats.c | 518 i_stat_index(kstat_named_t *knp, ilbst_stat_t *stats, int count) in i_stat_index() argument 523 if (strcasecmp(stats[i].is_name, knp->name) == 0) in i_stat_index() 533 kstat_named_t *knp; in i_copy_sstats() local 536 knp = KSTAT_NAMED_PTR(kp); in i_copy_sstats() 537 for (i = 0; i < kp->ks_ndata; i++, knp++) { in i_copy_sstats() 538 ind = i_stat_index(knp, servstats, SSTAT_SZ); in i_copy_sstats() 541 (void) strlcpy(sp->isd_serverstats[ind].is_name, knp->name, in i_copy_sstats() 543 sp->isd_serverstats[ind].is_value = knp->value.ui64; in i_copy_sstats() 609 kstat_named_t *knp; in i_copy_rstats() local 612 knp = KSTAT_NAMED_PTR(kp); in i_copy_rstats() [all …]
|
/illumos-gate/usr/src/lib/libkstat/common/ |
H A D | kstat.c | 146 kstat_named_t *knp = data; in kstat_read() local 148 for (i = 0; i < ksp->ks_ndata; i++, knp++) { in kstat_read() 149 if (knp->data_type != KSTAT_DATA_STRING) in kstat_read() 151 if (KSTAT_NAMED_STR_PTR(knp) == NULL) in kstat_read() 160 KSTAT_NAMED_STR_PTR(knp) = (char *)data + in kstat_read() 161 (KSTAT_NAMED_STR_PTR(knp) - in kstat_read()
|
/illumos-gate/usr/src/uts/common/io/ntxn/ |
H A D | unm_nic_main.c | 2070 kstat_named_t *knp; in unm_kstat_update() local 2076 knp = ksp->ks_data; in unm_kstat_update() 2078 (knp++)->value.ui32 = adapter->freehdls; in unm_kstat_update() 2079 (knp++)->value.ui64 = adapter->freecmds; in unm_kstat_update() 2080 (knp++)->value.ui64 = adapter->tx_bcopy_threshold; in unm_kstat_update() 2081 (knp++)->value.ui64 = adapter->rx_bcopy_threshold; in unm_kstat_update() 2083 (knp++)->value.ui64 = adapter->stats.xmitcalled; in unm_kstat_update() 2084 (knp++)->value.ui64 = adapter->stats.xmitedframes; in unm_kstat_update() 2085 (knp++)->value.ui64 = adapter->stats.xmitfinished; in unm_kstat_update() 2086 (knp++)->value.ui64 = adapter->stats.txbytes; in unm_kstat_update() [all …]
|
/illumos-gate/usr/src/uts/sun4/os/ |
H A D | machdep.c | 443 kstat_named_t *knp; in cpu_create_intrstat() local 462 knp = (kstat_named_t *)intr_ksp->ks_data; in cpu_create_intrstat() 467 kstat_named_init(&knp[i * 2], name, KSTAT_DATA_UINT64); in cpu_create_intrstat() 470 kstat_named_init(&knp[(i * 2) + 1], name, in cpu_create_intrstat() 493 kstat_named_t *knp = ksp->ks_data; in cpu_kstat_intrstat_update() local 507 knp[i * 2].value.ui64 = cpup->cpu_m.intrstat[i + 1][0]; in cpu_kstat_intrstat_update() 508 knp[(i * 2) + 1].value.ui64 = cpup->cpu_stats.sys.intr[i]; in cpu_kstat_intrstat_update() 512 knp[i * 2].value.ui64 = in cpu_kstat_intrstat_update() 513 (uint64_t)tick2ns((hrtime_t)knp[i * 2].value.ui64, in cpu_kstat_intrstat_update()
|
/illumos-gate/usr/src/cmd/stat/common/ |
H A D | acquire.c | 246 kstat_named_t *knp; in acquire_sys() local 273 knp = (kstat_named_t *)kstat_data_lookup(ksp, "clk_intr"); in acquire_sys() 274 if (knp == NULL) in acquire_sys() 277 ss->s_sys.ss_ticks = knp->value.l; in acquire_sys() 279 knp = (kstat_named_t *)kstat_data_lookup(ksp, "deficit"); in acquire_sys() 280 if (knp == NULL) in acquire_sys() 283 ss->s_sys.ss_deficit = knp->value.l; in acquire_sys()
|