svn commit: r306831 - in user/alc/PQ_LAUNDRY/usr.bin: systat vmstat
Mark Johnston
markj at FreeBSD.org
Fri Oct 7 22:17:45 UTC 2016
Author: markj
Date: Fri Oct 7 22:17:43 2016
New Revision: 306831
URL: https://svnweb.freebsd.org/changeset/base/306831
Log:
Teach vmstat and systat about v_pdshortfalls.
Modified:
user/alc/PQ_LAUNDRY/usr.bin/systat/vmstat.c
user/alc/PQ_LAUNDRY/usr.bin/vmstat/vmstat.c
Modified: user/alc/PQ_LAUNDRY/usr.bin/systat/vmstat.c
==============================================================================
--- user/alc/PQ_LAUNDRY/usr.bin/systat/vmstat.c Fri Oct 7 22:17:25 2016 (r306830)
+++ user/alc/PQ_LAUNDRY/usr.bin/systat/vmstat.c Fri Oct 7 22:17:43 2016 (r306831)
@@ -95,6 +95,7 @@ static struct Info {
u_int v_reactivated; /* number of pages reactivated by pagedaemon */
u_int v_pdwakeups; /* number of times daemon has awaken from sleep */
u_int v_pdpages; /* number of pages analyzed by daemon */
+ u_int v_pdshortfalls; /* number of page reclaimation shortfalls */
u_int v_dfree; /* pages freed by daemon */
u_int v_pfree; /* pages freed by exiting processes */
@@ -339,14 +340,15 @@ labelkre(void)
mvprintw(VMSTATROW + 8, VMSTATCOL + 9, "react");
mvprintw(VMSTATROW + 9, VMSTATCOL + 9, "pdwak");
mvprintw(VMSTATROW + 10, VMSTATCOL + 9, "pdpgs");
- mvprintw(VMSTATROW + 11, VMSTATCOL + 9, "intrn");
- mvprintw(VMSTATROW + 12, VMSTATCOL + 9, "wire");
- mvprintw(VMSTATROW + 13, VMSTATCOL + 9, "act");
- mvprintw(VMSTATROW + 14, VMSTATCOL + 9, "inact");
- mvprintw(VMSTATROW + 15, VMSTATCOL + 9, "laund");
- mvprintw(VMSTATROW + 16, VMSTATCOL + 9, "free");
- if (LINES - 1 > VMSTATROW + 17)
- mvprintw(VMSTATROW + 17, VMSTATCOL + 9, "buf");
+ mvprintw(VMSTATROW + 11, VMSTATCOL + 9, "pdshort");
+ mvprintw(VMSTATROW + 12, VMSTATCOL + 9, "intrn");
+ mvprintw(VMSTATROW + 13, VMSTATCOL + 9, "wire");
+ mvprintw(VMSTATROW + 14, VMSTATCOL + 9, "act");
+ mvprintw(VMSTATROW + 15, VMSTATCOL + 9, "inact");
+ mvprintw(VMSTATROW + 16, VMSTATCOL + 9, "laund");
+ mvprintw(VMSTATROW + 17, VMSTATCOL + 9, "free");
+ if (LINES - 1 > VMSTATROW + 18)
+ mvprintw(VMSTATROW + 18, VMSTATCOL + 9, "buf");
mvprintw(GENSTATROW, GENSTATCOL, " Csw Trp Sys Int Sof Flt");
@@ -515,14 +517,15 @@ showkre(void)
PUTRATE(v_reactivated, VMSTATROW + 8, VMSTATCOL, 8);
PUTRATE(v_pdwakeups, VMSTATROW + 9, VMSTATCOL, 8);
PUTRATE(v_pdpages, VMSTATROW + 10, VMSTATCOL, 8);
- PUTRATE(v_intrans, VMSTATROW + 11, VMSTATCOL, 8);
- putint(pgtokb(s.v_wire_count), VMSTATROW + 12, VMSTATCOL, 8);
- putint(pgtokb(s.v_active_count), VMSTATROW + 13, VMSTATCOL, 8);
- putint(pgtokb(s.v_inactive_count), VMSTATROW + 14, VMSTATCOL, 8);
- putint(pgtokb(s.v_laundry_count), VMSTATROW + 15, VMSTATCOL, 8);
- putint(pgtokb(s.v_free_count), VMSTATROW + 16, VMSTATCOL, 8);
- if (LINES - 1 > VMSTATROW + 17)
- putint(s.bufspace / 1024, VMSTATROW + 17, VMSTATCOL, 8);
+ PUTRATE(v_pdshortfalls, VMSTATROW + 11, VMSTATCOL, 8);
+ PUTRATE(v_intrans, VMSTATROW + 12, VMSTATCOL, 8);
+ putint(pgtokb(s.v_wire_count), VMSTATROW + 13, VMSTATCOL, 8);
+ putint(pgtokb(s.v_active_count), VMSTATROW + 14, VMSTATCOL, 8);
+ putint(pgtokb(s.v_inactive_count), VMSTATROW + 15, VMSTATCOL, 8);
+ putint(pgtokb(s.v_laundry_count), VMSTATROW + 16, VMSTATCOL, 8);
+ putint(pgtokb(s.v_free_count), VMSTATROW + 17, VMSTATCOL, 8);
+ if (LINES - 1 > VMSTATROW + 18)
+ putint(s.bufspace / 1024, VMSTATROW + 18, VMSTATCOL, 8);
PUTRATE(v_vnodein, PAGEROW + 2, PAGECOL + 6, 5);
PUTRATE(v_vnodeout, PAGEROW + 2, PAGECOL + 12, 5);
PUTRATE(v_swapin, PAGEROW + 2, PAGECOL + 19, 5);
@@ -786,6 +789,7 @@ getinfo(struct Info *ls)
GETSYSCTL("vm.stats.vm.v_reactivated", ls->v_reactivated);
GETSYSCTL("vm.stats.vm.v_pdwakeups", ls->v_pdwakeups);
GETSYSCTL("vm.stats.vm.v_pdpages", ls->v_pdpages);
+ GETSYSCTL("vm.stats.vm.v_pdshortfalls", ls->v_pdshortfalls);
GETSYSCTL("vm.stats.vm.v_dfree", ls->v_dfree);
GETSYSCTL("vm.stats.vm.v_pfree", ls->v_pfree);
GETSYSCTL("vm.stats.vm.v_tfree", ls->v_tfree);
Modified: user/alc/PQ_LAUNDRY/usr.bin/vmstat/vmstat.c
==============================================================================
--- user/alc/PQ_LAUNDRY/usr.bin/vmstat/vmstat.c Fri Oct 7 22:17:25 2016 (r306830)
+++ user/alc/PQ_LAUNDRY/usr.bin/vmstat/vmstat.c Fri Oct 7 22:17:43 2016 (r306831)
@@ -567,6 +567,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_pdshortfalls);
GET_VM_STATS(vm, v_dfree);
GET_VM_STATS(vm, v_pfree);
GET_VM_STATS(vm, v_tfree);
@@ -1058,6 +1059,8 @@ dosum(void)
sum.v_pdwakeups);
xo_emit("{:page-daemon-pages/%9u} {N:pages examined by the page daemon}\n",
sum.v_pdpages);
+ xo_emit("{:page-reclaimation-shortfalls/%9u} {N:clean page reclaimation shortfalls}\n",
+ sum.v_pdshortfalls);
xo_emit("{:reactivated/%9u} {N:pages reactivated by the page daemon}\n",
sum.v_reactivated);
xo_emit("{:copy-on-write-faults/%9u} {N:copy-on-write faults}\n",
More information about the svn-src-user
mailing list