From e78b6da3d06d754e70a02580481275ee8558cd29 Mon Sep 17 00:00:00 2001 From: cburroughs Date: Wed, 12 Feb 2014 15:44:07 -0500 Subject: [PATCH] Include l2asize in arcstat For consistency with upstream pull in the l2asize update after reworking it from Perl to Python. References: https://github.com/mharsch/arcstat/pull/11 https://github.com/mharsch/arcstat/pull/12 Signed-off-by: cburroughs Signed-off-by: Brian Behlendorf Closes #2122 --- cmd/arcstat/arcstat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/arcstat/arcstat.py b/cmd/arcstat/arcstat.py index 2b5ac76f5..8fe1331af 100755 --- a/cmd/arcstat/arcstat.py +++ b/cmd/arcstat/arcstat.py @@ -90,6 +90,7 @@ cols = { "l2read": [6, 1000, "Total L2ARC accesses per second"], "l2hit%": [6, 100, "L2ARC access hit percentage"], "l2miss%": [7, 100, "L2ARC access miss percentage"], + "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"], } @@ -394,6 +395,7 @@ def calculate(): v["l2hit%"] = 100 * v["l2hits"] / v["l2read"] if v["l2read"] > 0 else 0 v["l2miss%"] = 100 - v["l2hit%"] if v["l2read"] > 0 else 0 + v["l2asize"] = cur["l2_asize"] v["l2size"] = cur["l2_size"] v["l2bytes"] = d["l2_read_bytes"] / sint