aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/auxstats
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2007-04-12 14:18:57 +0000
committerrsc <devnull@localhost>2007-04-12 14:18:57 +0000
commit4492a1eef753032e1be77e7359b1b4544a1d1bb6 (patch)
treeaeebb80dea52d87392d9640ecabedbccd39e590a /src/cmd/auxstats
parent86190ea39d2f42af86b9a7ffefaf32f385040f5c (diff)
downloadplan9port-4492a1eef753032e1be77e7359b1b4544a1d1bb6.tar.gz
plan9port-4492a1eef753032e1be77e7359b1b4544a1d1bb6.tar.bz2
plan9port-4492a1eef753032e1be77e7359b1b4544a1d1bb6.zip
better memory stats (Jeff Sickel)
Diffstat (limited to 'src/cmd/auxstats')
-rw-r--r--src/cmd/auxstats/Darwin.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cmd/auxstats/Darwin.c b/src/cmd/auxstats/Darwin.c
index 07f3596c..ccddcf6c 100644
--- a/src/cmd/auxstats/Darwin.c
+++ b/src/cmd/auxstats/Darwin.c
@@ -338,7 +338,7 @@ isys(char *name)
void
xvm(int first)
{
- uvlong total;
+ natural_t total, active;
if(first)
return;
@@ -347,8 +347,13 @@ xvm(int first)
+ sample.vm_stat.active_count
+ sample.vm_stat.inactive_count
+ sample.vm_stat.wire_count;
+
+ active = sample.vm_stat.active_count
+ + sample.vm_stat.inactive_count
+ + sample.vm_stat.wire_count;
+
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, "syscall %lld 1000\n", (vlong)sample.syscalls_mach+sample.syscalls_unix);