better memory stats (Jeff Sickel)
This commit is contained in:
parent
86190ea39d
commit
4492a1eef7
1 changed files with 7 additions and 2 deletions
|
|
@ -338,7 +338,7 @@ isys(char *name)
|
||||||
void
|
void
|
||||||
xvm(int first)
|
xvm(int first)
|
||||||
{
|
{
|
||||||
uvlong total;
|
natural_t total, active;
|
||||||
|
|
||||||
if(first)
|
if(first)
|
||||||
return;
|
return;
|
||||||
|
|
@ -347,8 +347,13 @@ xvm(int first)
|
||||||
+ sample.vm_stat.active_count
|
+ sample.vm_stat.active_count
|
||||||
+ sample.vm_stat.inactive_count
|
+ sample.vm_stat.inactive_count
|
||||||
+ sample.vm_stat.wire_count;
|
+ sample.vm_stat.wire_count;
|
||||||
|
|
||||||
|
active = sample.vm_stat.active_count
|
||||||
|
+ sample.vm_stat.inactive_count
|
||||||
|
+ sample.vm_stat.wire_count;
|
||||||
|
|
||||||
if(total)
|
if(total)
|
||||||
Bprint(&bout, "mem =%lld %lld\n", sample.vm_stat.active_count, total);
|
Bprint(&bout, "mem =%lud %lud\n", active, total);
|
||||||
|
|
||||||
Bprint(&bout, "context %lld 1000\n", (vlong)sample.csw);
|
Bprint(&bout, "context %lld 1000\n", (vlong)sample.csw);
|
||||||
Bprint(&bout, "syscall %lld 1000\n", (vlong)sample.syscalls_mach+sample.syscalls_unix);
|
Bprint(&bout, "syscall %lld 1000\n", (vlong)sample.syscalls_mach+sample.syscalls_unix);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue