From eaa29f1ce4e26f3a763bffb0f4866246e5894b9f Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 27 Jul 2007 20:01:22 +0000 Subject: Add a counter for the total number of pages cached and support for reporting the value of this counter in the program "vmstat". Approved by: re (rwatson) --- usr.bin/vmstat/vmstat.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'usr.bin/vmstat') diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index efd5b79945ef..28d45c02c2af 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -441,6 +441,7 @@ fill_vmmeter(struct vmmeter *vmmp) GET_VM_STATS(vm, v_reactivated); GET_VM_STATS(vm, v_pdwakeups); GET_VM_STATS(vm, v_pdpages); + GET_VM_STATS(vm, v_tcached); GET_VM_STATS(vm, v_dfree); GET_VM_STATS(vm, v_pfree); GET_VM_STATS(vm, v_tfree); @@ -721,6 +722,7 @@ dosum(void) (void)printf("%9u pages affected by fork()\n", sum.v_forkpages); (void)printf("%9u pages affected by vfork()\n", sum.v_vforkpages); (void)printf("%9u pages affected by rfork()\n", sum.v_rforkpages); + (void)printf("%9u pages cached\n", sum.v_tcached); (void)printf("%9u pages freed\n", sum.v_tfree); (void)printf("%9u pages freed by daemon\n", sum.v_dfree); (void)printf("%9u pages freed by exiting processes\n", sum.v_pfree); -- cgit v1.3