summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorzont <zont@FreeBSD.org>2013-01-28 12:58:37 +0000
committerzont <zont@FreeBSD.org>2013-01-28 12:58:37 +0000
commit74295506311b9507b710b2729ba15e2fa5a611c8 (patch)
treeb137b98d89360a5673d61116c1d2f71cd01ac690 /usr.bin
parent8b5d522b68095fe93e962912b0103acc1c5e4ee4 (diff)
downloadFreeBSD-src-74295506311b9507b710b2729ba15e2fa5a611c8.zip
FreeBSD-src-74295506311b9507b710b2729ba15e2fa5a611c8.tar.gz
- Show page faults requiring I/O when -s invoked.
Reviewed by: alc MFC after: 2 weeks
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/vmstat/vmstat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index fe3a29c..c089dbf 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -469,6 +469,7 @@ fill_vmmeter(struct vmmeter *vmmp)
ADD_FROM_PCPU(i, v_intr);
ADD_FROM_PCPU(i, v_soft);
ADD_FROM_PCPU(i, v_vm_faults);
+ ADD_FROM_PCPU(i, v_io_faults);
ADD_FROM_PCPU(i, v_cow_faults);
ADD_FROM_PCPU(i, v_cow_optim);
ADD_FROM_PCPU(i, v_zfod);
@@ -507,6 +508,7 @@ fill_vmmeter(struct vmmeter *vmmp)
/* vm */
GET_VM_STATS(vm, v_vm_faults);
+ GET_VM_STATS(vm, v_io_faults);
GET_VM_STATS(vm, v_cow_faults);
GET_VM_STATS(vm, v_cow_optim);
GET_VM_STATS(vm, v_zfod);
@@ -968,6 +970,7 @@ dosum(void)
(void)printf("%9u zero fill pages prezeroed\n", sum.v_ozfod);
(void)printf("%9u intransit blocking page faults\n", sum.v_intrans);
(void)printf("%9u total VM faults taken\n", sum.v_vm_faults);
+ (void)printf("%9u page faults requiring I/O\n", sum.v_io_faults);
(void)printf("%9u pages affected by kernel thread creation\n", sum.v_kthreadpages);
(void)printf("%9u pages affected by fork()\n", sum.v_forkpages);
(void)printf("%9u pages affected by vfork()\n", sum.v_vforkpages);
OpenPOWER on IntegriCloud