From: Matthew Dillon Date: Wed, 17 Mar 2010 02:52:13 +0000 (-0700) Subject: vmstat - update for changes in nch structure X-Git-Tag: v2.7.0~66 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/27abc816fbcb0fe0396d8ba1b6ecf4b829e66d23 vmstat - update for changes in nch structure * Adjust for changes in the namei / path lookup statistics structure --- diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index fb177dc17a..646caa56a3 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -549,6 +549,7 @@ dosum(void) size_t vmm_size = sizeof(vmm); int cpucnt; u_long nchtotal; + u_long nchpathtotal; size_t nch_size = sizeof(struct nchstats) * SMP_MAXCPU; if (sysctlbyname("vm.vmstats", &vms, &vms_size, NULL, 0)) { @@ -621,17 +622,17 @@ dosum(void) nchtotal = nchstats.ncs_goodhits + nchstats.ncs_neghits + nchstats.ncs_badhits + nchstats.ncs_falsehits + - nchstats.ncs_miss + nchstats.ncs_long; - printf("%9ld total name lookups\n", nchtotal); + nchstats.ncs_miss; + nchpathtotal = nchstats.ncs_longhits + nchstats.ncs_longmiss; + printf("%9ld total path lookups\n", nchpathtotal); + printf("%9ld total component lookups\n", nchtotal); printf( - "%9s cache hits (%ld%% pos + %ld%% neg) system %ld%% per-directory\n", + "%9s cache hits (%ld%% pos + %ld%% neg)\n", "", PCT(nchstats.ncs_goodhits, nchtotal), - PCT(nchstats.ncs_neghits, nchtotal), - PCT(nchstats.ncs_pass2, nchtotal)); - printf("%9s deletions %ld%%, falsehits %ld%%, toolong %ld%%\n", "", + PCT(nchstats.ncs_neghits, nchtotal)); + printf("%9s deletions %ld%%, falsehits %ld%%\n", "", PCT(nchstats.ncs_badhits, nchtotal), - PCT(nchstats.ncs_falsehits, nchtotal), - PCT(nchstats.ncs_long, nchtotal)); + PCT(nchstats.ncs_falsehits, nchtotal)); free(nch_tmp); }