From 63a77ae3cff2eea8f7d92c5ab2ab99af664b34a5 Mon Sep 17 00:00:00 2001 From: Gregor Kopka Date: Tue, 30 Oct 2018 00:18:20 +0100 Subject: [PATCH] Added column definitions to arcstat.py grow: ARC Grow enabled (!arc_no_grow) free: ARC Free memory (arc_sys_free) need: ARC Reclaim need (arc_need_free) Fixed alignment issues (mread had wrong width). Reviewed-by: George Melikov Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Signed-off-by: Gregor Kopka Closes #8058 --- cmd/arcstat/arcstat.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmd/arcstat/arcstat.py b/cmd/arcstat/arcstat.py index d7d3e9b73..a2c52ddb3 100755 --- a/cmd/arcstat/arcstat.py +++ b/cmd/arcstat/arcstat.py @@ -71,7 +71,7 @@ cols = { "pm%": [3, 100, "Prefetch miss percentage"], "mhit": [4, 1000, "Metadata hits per second"], "mmis": [4, 1000, "Metadata misses per second"], - "mread": [4, 1000, "Metadata accesses per second"], + "mread": [5, 1000, "Metadata accesses per second"], "mh%": [3, 100, "Metadata hit percentage"], "mm%": [3, 100, "Metadata miss percentage"], "arcsz": [5, 1024, "ARC Size"], @@ -92,6 +92,9 @@ cols = { "l2asize": [7, 1024, "Actual (compressed) size of the L2ARC"], "l2size": [6, 1024, "Size of the L2ARC"], "l2bytes": [7, 1024, "bytes read per second from the L2ARC"], + "grow": [4, 1000, "ARC Grow disabled"], + "need": [4, 1024, "ARC Reclaim need"], + "free": [4, 1024, "ARC Free memory"], } v = {} @@ -423,6 +426,10 @@ def calculate(): v["l2size"] = cur["l2_size"] v["l2bytes"] = d["l2_read_bytes"] / sint + v["grow"] = 0 if cur["arc_no_grow"] else 1 + v["need"] = cur["arc_need_free"] + v["free"] = cur["arc_sys_free"] + def main(): global sint