update arc stat/summary missing l2arc MFU/MRU stats patches

...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-11-10 09:57:42 +01:00
parent b4d26406ac
commit eb93ae9166

View File

@ -16,28 +16,32 @@ than throwing an exception.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
--- ---
cmd/arc_summary/arc_summary3 | 4 ++-- cmd/arc_summary/arc_summary3 | 8 ++++----
cmd/arcstat/arcstat.in | 4 ++-- cmd/arcstat/arcstat.in | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-) 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/cmd/arc_summary/arc_summary3 b/cmd/arc_summary/arc_summary3 diff --git a/cmd/arc_summary/arc_summary3 b/cmd/arc_summary/arc_summary3
index 7b28012ed..b0a31bbb7 100755 index 7b28012ed..0a81b2bc7 100755
--- a/cmd/arc_summary/arc_summary3 --- a/cmd/arc_summary/arc_summary3
+++ b/cmd/arc_summary/arc_summary3 +++ b/cmd/arc_summary/arc_summary3
@@ -617,11 +617,11 @@ def section_arc(kstats_dict): @@ -617,13 +617,13 @@ def section_arc(kstats_dict):
prt_i1('L2 cached evictions:', f_bytes(arc_stats['evict_l2_cached'])) prt_i1('L2 cached evictions:', f_bytes(arc_stats['evict_l2_cached']))
prt_i1('L2 eligible evictions:', f_bytes(arc_stats['evict_l2_eligible'])) prt_i1('L2 eligible evictions:', f_bytes(arc_stats['evict_l2_eligible']))
prt_i2('L2 eligible MFU evictions:', prt_i2('L2 eligible MFU evictions:',
- f_perc(arc_stats['evict_l2_eligible_mfu'], - f_perc(arc_stats['evict_l2_eligible_mfu'],
+ f_perc(arc_stats.get('evict_l2_eligible_mfu', 0), # 2.0 module compat + f_perc(arc_stats.get('evict_l2_eligible_mfu', 0), # 2.0 module compat
arc_stats['evict_l2_eligible']), arc_stats['evict_l2_eligible']),
f_bytes(arc_stats['evict_l2_eligible_mfu'])) - f_bytes(arc_stats['evict_l2_eligible_mfu']))
+ f_bytes(arc_stats.get('evict_l2_eligible_mfu', 0)))
prt_i2('L2 eligible MRU evictions:', prt_i2('L2 eligible MRU evictions:',
- f_perc(arc_stats['evict_l2_eligible_mru'], - f_perc(arc_stats['evict_l2_eligible_mru'],
+ f_perc(arc_stats.get('evict_l2_eligible_mru', 0), # 2.0 module compat + f_perc(arc_stats.get('evict_l2_eligible_mru', 0), # 2.0 module compat
arc_stats['evict_l2_eligible']), arc_stats['evict_l2_eligible']),
f_bytes(arc_stats['evict_l2_eligible_mru'])) - f_bytes(arc_stats['evict_l2_eligible_mru']))
+ f_bytes(arc_stats.get('evict_l2_eligible_mru', 0)))
prt_i1('L2 ineligible evictions:', prt_i1('L2 ineligible evictions:',
f_bytes(arc_stats['evict_l2_ineligible']))
print()
diff --git a/cmd/arcstat/arcstat.in b/cmd/arcstat/arcstat.in diff --git a/cmd/arcstat/arcstat.in b/cmd/arcstat/arcstat.in
index cd9a803a2..6878419e7 100755 index cd9a803a2..6878419e7 100755
--- a/cmd/arcstat/arcstat.in --- a/cmd/arcstat/arcstat.in