summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2006-04-30 20:31:00 +0000
committerbde <bde@FreeBSD.org>2006-04-30 20:31:00 +0000
commit049c5fd93e3c8e349b2205d297271c9f30bb4bb0 (patch)
tree227724c358efd9cbc7e09914cb9c86b8279b19af /usr.bin/systat
parent837df5219a7df4f19f39bac3256f69180cdbe9c0 (diff)
downloadFreeBSD-src-049c5fd93e3c8e349b2205d297271c9f30bb4bb0.zip
FreeBSD-src-049c5fd93e3c8e349b2205d297271c9f30bb4bb0.tar.gz
Reduce the namei (sub)display by 5 columns to make enough space for a
new vnstat display to the right of the namei display. Move the non-vmstat fields {des,num,fre}vn from the vmstat display to a new vnstat display. Move the dtbuf field there too. The buf and dtbuf fields are non-vmstat and non-vnstat, so there is no good place to display them. I need to move at least 1 of them out of the vm stats for further cleanups of the vm stats, and there is only space for 1 of them in the vn stats. (The best place for the current buf field is actually /dev/null, since it has been completely broken for about 10 years and broken for longer. It gives an uninteresting virtual memory count where an interesting real memory count is wanted.)
Diffstat (limited to 'usr.bin/systat')
-rw-r--r--usr.bin/systat/vmstat.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c
index aa1b256..bc6be85 100644
--- a/usr.bin/systat/vmstat.c
+++ b/usr.bin/systat/vmstat.c
@@ -195,7 +195,9 @@ closekre(w)
#define VMSTATCOL 48 /* actually 50-51 for some fields */
#define GRAPHROW 10 /* uses 3 rows and 51 cols */
#define GRAPHCOL 0
-#define NAMEIROW 14 /* uses 3 rows and 37 cols */
+#define VNSTATROW 13 /* uses 4 rows and 13 columns */
+#define VNSTATCOL 35
+#define NAMEIROW 14 /* uses 3 rows and 32 cols */
#define NAMEICOL 0
#define DISKROW 18 /* uses 5 rows and 47 cols (for 7 drives) */
#define DISKCOL 0
@@ -346,11 +348,6 @@ labelkre()
mvprintw(VMSTATROW + 11, VMSTATCOL + 10, "pdpgs");
mvprintw(VMSTATROW + 12, VMSTATCOL + 10, "intrn");
mvprintw(VMSTATROW + 13, VMSTATCOL + 10, "buf");
- mvprintw(VMSTATROW + 14, VMSTATCOL + 10, "dtbuf");
-
- mvprintw(VMSTATROW + 15, VMSTATCOL + 10, "desvn");
- mvprintw(VMSTATROW + 16, VMSTATCOL + 10, "numvn");
- mvprintw(VMSTATROW + 17, VMSTATCOL + 10, "frevn");
mvprintw(GENSTATROW, GENSTATCOL, " Csw Trp Sys Int Sof Flt");
@@ -361,9 +358,14 @@ labelkre()
mvprintw(GRAPHROW + 1, GRAPHCOL,
"| | | | | | | | | | |");
- mvprintw(NAMEIROW, NAMEICOL, "Namei Name-cache Dir-cache");
+ mvprintw(VNSTATROW, VNSTATCOL + 8, "dtbuf");
+ mvprintw(VNSTATROW + 1, VNSTATCOL + 8, "desvn");
+ mvprintw(VNSTATROW + 2, VNSTATCOL + 8, "numvn");
+ mvprintw(VNSTATROW + 3, VNSTATCOL + 8, "frevn");
+
+ mvprintw(NAMEIROW, NAMEICOL, "Namei Name-cache Dir-cache");
mvprintw(NAMEIROW + 1, NAMEICOL,
- " Calls hits %% hits %%");
+ " Calls hits %% hits %%");
mvprintw(DISKROW, DISKCOL, "Disks");
mvprintw(DISKROW + 1, DISKCOL, "KB/t");
mvprintw(DISKROW + 2, DISKCOL, "tps");
@@ -542,10 +544,6 @@ showkre()
}
putint(s.bufspace/1024, VMSTATROW + 13, VMSTATCOL, 9);
- putint(s.numdirtybuffers, VMSTATROW + 14, VMSTATCOL, 9);
- putint(s.desiredvnodes, VMSTATROW + 15, VMSTATCOL, 9);
- putint(s.numvnodes, VMSTATROW + 16, VMSTATCOL, 9);
- putint(s.freevnodes, VMSTATROW + 17, VMSTATCOL, 9);
PUTRATE(v_vnodein, PAGEROW + 2, PAGECOL + 6, 5);
PUTRATE(v_vnodeout, PAGEROW + 2, PAGECOL + 12, 5);
PUTRATE(v_swapin, PAGEROW + 2, PAGECOL + 19, 5);
@@ -574,16 +572,20 @@ showkre()
break;
}
}
- putint(s.nchcount, NAMEIROW + 2, NAMEICOL, 9);
+ putint(s.numdirtybuffers, VNSTATROW, VNSTATCOL, 7);
+ putint(s.desiredvnodes, VNSTATROW + 1, VNSTATCOL, 7);
+ putint(s.numvnodes, VNSTATROW + 2, VNSTATCOL, 7);
+ putint(s.freevnodes, VNSTATROW + 3, VNSTATCOL, 7);
+ putint(s.nchcount, NAMEIROW + 2, NAMEICOL, 8);
putint((nchtotal.ncs_goodhits + nchtotal.ncs_neghits),
- NAMEIROW + 2, NAMEICOL + 10, 8);
+ NAMEIROW + 2, NAMEICOL + 9, 7);
#define nz(x) ((x) ? (x) : 1)
putfloat((nchtotal.ncs_goodhits+nchtotal.ncs_neghits) *
100.0 / nz(s.nchcount),
- NAMEIROW + 2, NAMEICOL + 19, 4, 0, 1);
- putint(nchtotal.ncs_pass2, NAMEIROW + 2, NAMEICOL + 24, 8);
+ NAMEIROW + 2, NAMEICOL + 17, 3, 0, 1);
+ putint(nchtotal.ncs_pass2, NAMEIROW + 2, NAMEICOL + 21, 7);
putfloat(nchtotal.ncs_pass2 * 100.0 / nz(s.nchcount),
- NAMEIROW + 2, NAMEICOL + 33, 4, 0, 1);
+ NAMEIROW + 2, NAMEICOL + 29, 3, 0, 1);
#undef nz
}
OpenPOWER on IntegriCloud