Lines 108-113
Link Here
|
108 |
u_int v_active_count; /* number of pages active */ |
107 |
u_int v_active_count; /* number of pages active */ |
109 |
u_int v_inactive_count; /* number of pages inactive */ |
108 |
u_int v_inactive_count; /* number of pages inactive */ |
110 |
u_int v_cache_count; /* number of pages on buffer cache queue */ |
109 |
u_int v_cache_count; /* number of pages on buffer cache queue */ |
|
|
110 |
u_long v_kmem_map_size; /* Current kmem allocation size */ |
111 |
struct vmtotal Total; |
111 |
struct vmtotal Total; |
112 |
struct nchstats nchstats; |
112 |
struct nchstats nchstats; |
113 |
long nchcount; |
113 |
long nchcount; |
Lines 118-125
Link Here
|
118 |
long freevnodes; |
118 |
long freevnodes; |
119 |
int numdirtybuffers; |
119 |
int numdirtybuffers; |
120 |
} s, s1, s2, z; |
120 |
} s, s1, s2, z; |
|
|
121 |
static u_long kmem_size; |
122 |
static u_int v_page_count; |
121 |
|
123 |
|
122 |
struct statinfo cur, last, run; |
124 |
struct statinfo cur, last, run; |
123 |
|
125 |
|
124 |
#define total s.Total |
126 |
#define total s.Total |
125 |
#define nchtotal s.nchstats |
127 |
#define nchtotal s.nchstats |
Lines 278-283
Link Here
|
278 |
allocinfo(&s2); |
266 |
allocinfo(&s2); |
279 |
allocinfo(&z); |
267 |
allocinfo(&z); |
280 |
} |
268 |
} |
|
|
269 |
GETSYSCTL("vm.kmem_size", kmem_size); |
270 |
GETSYSCTL("vm.stats.vm.v_page_count", v_page_count); |
281 |
getinfo(&s2); |
271 |
getinfo(&s2); |
282 |
copyinfo(&s2, &s1); |
272 |
copyinfo(&s2, &s1); |
283 |
return(1); |
273 |
return(1); |
Lines 307-314
Link Here
|
307 |
|
297 |
|
308 |
clear(); |
298 |
clear(); |
309 |
mvprintw(STATROW, STATCOL + 6, "users Load"); |
299 |
mvprintw(STATROW, STATCOL + 6, "users Load"); |
310 |
mvprintw(MEMROW, MEMCOL, "Mem:KB REAL VIRTUAL"); |
300 |
mvprintw(MEMROW, MEMCOL, "Phy: %% REAL VIRTUAL Kmem: %%"); |
311 |
mvprintw(MEMROW + 1, MEMCOL, " Tot Share Tot Share"); |
301 |
mvprintw(MEMROW + 1, MEMCOL, "Mem: Tot Share Tot Share"); |
312 |
mvprintw(MEMROW + 2, MEMCOL, "Act"); |
302 |
mvprintw(MEMROW + 2, MEMCOL, "Act"); |
313 |
mvprintw(MEMROW + 3, MEMCOL, "All"); |
303 |
mvprintw(MEMROW + 3, MEMCOL, "All"); |
314 |
|
304 |
|
Lines 478-483
Link Here
|
478 |
putfloat(avenrun[2], STATROW, STATCOL + 32, 5, 2, 0); |
449 |
putfloat(avenrun[2], STATROW, STATCOL + 32, 5, 2, 0); |
479 |
mvaddstr(STATROW, STATCOL + 55, buf); |
450 |
mvaddstr(STATROW, STATCOL + 55, buf); |
480 |
#define pgtokb(pg) ((pg) * (s.v_page_size / 1024)) |
451 |
#define pgtokb(pg) ((pg) * (s.v_page_size / 1024)) |
|
|
452 |
putfloat(100.0 * (v_page_count - total.t_free) / v_page_count, |
453 |
MEMROW, MEMCOL + 4, 3, 0, 1); |
454 |
putfloat(100.0 * s.v_kmem_map_size / kmem_size, |
455 |
MEMROW, MEMCOL + 41, 3, 0, 1); |
481 |
putint(pgtokb(total.t_arm), MEMROW + 2, MEMCOL + 4, 7); |
456 |
putint(pgtokb(total.t_arm), MEMROW + 2, MEMCOL + 4, 7); |
482 |
putint(pgtokb(total.t_armshr), MEMROW + 2, MEMCOL + 12, 7); |
457 |
putint(pgtokb(total.t_armshr), MEMROW + 2, MEMCOL + 12, 7); |
483 |
putint(pgtokb(total.t_avm), MEMROW + 2, MEMCOL + 20, 8); |
458 |
putint(pgtokb(total.t_avm), MEMROW + 2, MEMCOL + 20, 8); |
Lines 790-795
Link Here
|
790 |
GETSYSCTL("vfs.freevnodes", ls->freevnodes); |
762 |
GETSYSCTL("vfs.freevnodes", ls->freevnodes); |
791 |
GETSYSCTL("vfs.cache.nchstats", ls->nchstats); |
763 |
GETSYSCTL("vfs.cache.nchstats", ls->nchstats); |
792 |
GETSYSCTL("vfs.numdirtybuffers", ls->numdirtybuffers); |
764 |
GETSYSCTL("vfs.numdirtybuffers", ls->numdirtybuffers); |
|
|
765 |
GETSYSCTL("vm.kmem_map_size", ls->v_kmem_map_size); |
793 |
getsysctl("hw.intrcnt", ls->intrcnt, nintr * sizeof(u_long)); |
766 |
getsysctl("hw.intrcnt", ls->intrcnt, nintr * sizeof(u_long)); |
794 |
|
767 |
|
795 |
size = sizeof(ls->Total); |
768 |
size = sizeof(ls->Total); |