Print this page
3724 kstat reports idle time as io_wait, kernel as pio_wait, etc

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/stat/kstat/kstat.c
          +++ new/usr/src/cmd/stat/kstat/kstat.c
↓ open down ↓ 910 lines elided ↑ open up ↑
 911  911  
 912  912          stat = (cpu_stat_t *)(kp->ks_data);
 913  913          sysinfo = &stat->cpu_sysinfo;
 914  914          syswait = &stat->cpu_syswait;
 915  915          vminfo  = &stat->cpu_vminfo;
 916  916  
 917  917          SAVE_UINT32_X(ksi, "idle", sysinfo->cpu[CPU_IDLE]);
 918  918          SAVE_UINT32_X(ksi, "user", sysinfo->cpu[CPU_USER]);
 919  919          SAVE_UINT32_X(ksi, "kernel", sysinfo->cpu[CPU_KERNEL]);
 920  920          SAVE_UINT32_X(ksi, "wait", sysinfo->cpu[CPU_WAIT]);
 921      -        SAVE_UINT32_X(ksi, "wait_io", sysinfo->cpu[W_IO]);
 922      -        SAVE_UINT32_X(ksi, "wait_swap", sysinfo->cpu[W_SWAP]);
 923      -        SAVE_UINT32_X(ksi, "wait_pio", sysinfo->cpu[W_PIO]);
      921 +        SAVE_UINT32_X(ksi, "wait_io", sysinfo->wait[W_IO]);
      922 +        SAVE_UINT32_X(ksi, "wait_swap", sysinfo->wait[W_SWAP]);
      923 +        SAVE_UINT32_X(ksi, "wait_pio", sysinfo->wait[W_PIO]);
 924  924          SAVE_UINT32(ksi, sysinfo, bread);
 925  925          SAVE_UINT32(ksi, sysinfo, bwrite);
 926  926          SAVE_UINT32(ksi, sysinfo, lread);
 927  927          SAVE_UINT32(ksi, sysinfo, lwrite);
 928  928          SAVE_UINT32(ksi, sysinfo, phread);
 929  929          SAVE_UINT32(ksi, sysinfo, phwrite);
 930  930          SAVE_UINT32(ksi, sysinfo, pswitch);
 931  931          SAVE_UINT32(ksi, sysinfo, trap);
 932  932          SAVE_UINT32(ksi, sysinfo, intr);
 933  933          SAVE_UINT32(ksi, sysinfo, syscall);
↓ open down ↓ 529 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX