summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorsbruno <sbruno@FreeBSD.org>2010-06-15 19:28:37 +0000
committersbruno <sbruno@FreeBSD.org>2010-06-15 19:28:37 +0000
commit3571902304966f5edad4bceddc7fb3170f4ff982 (patch)
treec365e722a1674a60a8186f54209e8934369f70a5 /usr.bin
parent597252854841710d6981f293f5bab6880df163b0 (diff)
downloadFreeBSD-src-3571902304966f5edad4bceddc7fb3170f4ff982.zip
FreeBSD-src-3571902304966f5edad4bceddc7fb3170f4ff982.tar.gz
Add a new column to the output of vmstat -z to indicate the number
of times the system was forced to sleep when requesting a new allocation. Expand the debugger hook, db_show_uma, to display these results as well. This has proven to be very useful in out of memory situations when it is not known why systems have become sluggish or fail in odd ways. Reviewed by: rwatson alc Approved by: scottl (mentor) peter Obtained from: Yahoo Inc.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/vmstat/vmstat.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index 4105a36..7583142 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -1294,16 +1294,17 @@ domemstat_zone(void)
memstat_strerror(error));
}
}
- printf("%-20s %8s %8s %8s %8s %8s %8s\n\n", "ITEM", "SIZE",
- "LIMIT", "USED", "FREE", "REQUESTS", "FAILURES");
+ printf("%-20s %6s %6s %8s %8s %8s %4s %4s\n\n", "ITEM", "SIZE",
+ "LIMIT", "USED", "FREE", "REQ", "FAIL", "SLEEP");
for (mtp = memstat_mtl_first(mtlp); mtp != NULL;
mtp = memstat_mtl_next(mtp)) {
strlcpy(name, memstat_get_name(mtp), MEMTYPE_MAXNAME);
strcat(name, ":");
- printf("%-20s %8llu, %8llu, %8llu, %8llu, %8llu, %8llu\n", name,
+ printf("%-20s %6llu, %6llu,%8llu,%8llu,%8llu,%4llu,%4llu\n",name,
memstat_get_size(mtp), memstat_get_countlimit(mtp),
memstat_get_count(mtp), memstat_get_free(mtp),
- memstat_get_numallocs(mtp), memstat_get_failures(mtp));
+ memstat_get_numallocs(mtp), memstat_get_failures(mtp),
+ memstat_get_sleeps(mtp));
}
memstat_mtl_free(mtlp);
printf("\n");
OpenPOWER on IntegriCloud