summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2007-07-27 20:01:22 +0000
committeralc <alc@FreeBSD.org>2007-07-27 20:01:22 +0000
commit215153274beaafd4d2823230dbaeb22b8221bda3 (patch)
tree8e9f41f9c946405cd5f6454b3352de81812bac7d /usr.bin
parent586f9a7d3a60f661125bc20b7161b65f0285b6a8 (diff)
downloadFreeBSD-src-215153274beaafd4d2823230dbaeb22b8221bda3.zip
FreeBSD-src-215153274beaafd4d2823230dbaeb22b8221bda3.tar.gz
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)
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/vmstat/vmstat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index efd5b79..28d45c0 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);
OpenPOWER on IntegriCloud