]> granicus.if.org Git - zfs/commitdiff
Include l2asize in arcstat
authorcburroughs <chris.burroughs@gmail.com>
Wed, 12 Feb 2014 20:44:07 +0000 (15:44 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 4 Mar 2014 19:25:58 +0000 (11:25 -0800)
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 <chris.burroughs@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2122

cmd/arcstat/arcstat.py

index 2b5ac76f5bea91a20105005d2519d04b384f122e..8fe1331afa9788c357ecc19acec0732abc40d3ca 100755 (executable)
@@ -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