From a3ba1d2bd22ad6f00d60c39cfe87eb9be1de1761 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 20 Sep 2015 19:53:09 +0200 Subject: [PATCH 143/325] top: Show ZFS ARC target size Obtained from: ElectroBSD --- usr.bin/top/machine.c | 4 +++- usr.bin/top/top.1 | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 6116a06bb28b..cd1c61fe6b8a 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -133,7 +133,7 @@ static const char *memorynames[] = { static int memory_stats[nitems(memorynames)]; static const char *arcnames[] = { - "K Total, ", "K MFU, ", "K MRU, ", "K Anon, ", "K Header, ", "K Other", + "K Total, ", "K MFU, ", "K MRU, ", "K Anon, ", "K Header, ", "K Other, ", "K Target", NULL }; static int arc_stats[nitems(arcnames)]; @@ -535,6 +535,8 @@ get_system_info(struct system_info *si) arc_stats[5] += arc_stat >> 10; GETSYSCTL("kstat.zfs.misc.arcstats.dbuf_size", arc_stat); arc_stats[5] += arc_stat >> 10; + GETSYSCTL("kstat.zfs.misc.arcstats.c", arc_stat); + arc_stats[6] = arc_stat >> 10; si->arc = arc_stats; } if (carc_enabled) { diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index 4a587877dba6..87334a1a7792 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -442,7 +442,7 @@ are not. .Sh DESCRIPTION OF MEMORY .Bd -literal Mem: 61M Active, 86M Inact, 368K Laundry, 22G Wired, 102G Free -ARC: 15G Total, 9303M MFU, 6155M MRU, 1464K Anon, 98M Header, 35M Other +ARC: 15G Total, 9303M MFU, 6155M MRU, 1464K Anon, 98M Header, 35M Other, 15G Target 15G Compressed, 27G Uncompressed, 1.75:1 Ratio, 174M Overhead Swap: 4096M Total, 532M Free, 13% Inuse, 80K In, 104K Out .Ed @@ -477,6 +477,12 @@ number of ARC bytes holding in flight data number of ARC bytes holding headers .It Em Other miscellaneous ARC bytes +.B Target: +ARC target size, that is the total amount of memory +the ARC considers usable for itself. If it's not equal +to the total size, the ARC will shrink or grow to reach +the target. +.TP .It Em Compressed bytes of memory used by ARC caches .It Em Uncompressed -- 2.32.0