diff options
author | asmodai <asmodai@FreeBSD.org> | 2002-04-08 10:39:12 +0000 |
---|---|---|
committer | asmodai <asmodai@FreeBSD.org> | 2002-04-08 10:39:12 +0000 |
commit | 3ca5a4b299c3140f8a993225944468ca887d4b9a (patch) | |
tree | 6aa21dd1b898f33f6bdd1cabf1fa2d9bf8ee8832 /usr.bin/vmstat | |
parent | caca591db32de62e9d285089a17accffe2db18f1 (diff) | |
download | FreeBSD-src-3ca5a4b299c3140f8a993225944468ca887d4b9a.zip FreeBSD-src-3ca5a4b299c3140f8a993225944468ca887d4b9a.tar.gz |
Change totreq to uint64_t from a long (the PR has an int64_t, which didn't
make sense to me) and change the printf argument from %8ld to %20llu to
accompany the printing of the totals.
Realigned the header printed above it as well.
PR: 32342
Submitted by: ryan beasley <ryanb@goddamnbastard.org>
Reviewed by: jeff, Tim J Robbins
Diffstat (limited to 'usr.bin/vmstat')
-rw-r--r-- | usr.bin/vmstat/vmstat.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index b792ac6..1a15b75 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -761,7 +761,8 @@ domem() struct malloc_type *ks; int i, j; int first, nkms; - long totuse = 0, totfree = 0, totreq = 0; + long totuse = 0, totfree = 0; + uint64_t totreq = 0; struct malloc_type kmemstats[MAX_KMSTATS], *kmsp; char buf[1024]; @@ -810,8 +811,8 @@ domem() totuse += ks->ks_memuse; totreq += ks->ks_calls; } - (void)printf("\nMemory Totals: In Use Free Requests\n"); - (void)printf(" %7ldK %6ldK %8ld\n", + (void)printf("\nMemory Totals: In Use Free Requests\n"); + (void)printf(" %7ldK %6ldK %20llu\n", (totuse + 1023) / 1024, (totfree + 1023) / 1024, totreq); } |