X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fzfs_arc.c;h=f0d23239a82ab158c03c669f9a96cf2fc7f8dd24;hb=e9ecee2a61356a293f086dd3d36d2381486b563e;hp=b784ee3a3fc1374a66e03f12b432c625ae48dce1;hpb=eea01a8f212634414a21462ba79dc058dc5fb304;p=collectd.git diff --git a/src/zfs_arc.c b/src/zfs_arc.c index b784ee3a..f0d23239 100644 --- a/src/zfs_arc.c +++ b/src/zfs_arc.c @@ -251,7 +251,14 @@ static int za_read (void) /* Sizes */ za_read_gauge (ksp, "size", "cache_size", "arc"); - za_read_gauge (ksp, "l2_size", "cache_size", "L2"); + + /* The "l2_size" value has disappeared from Solaris some time in + * early 2013, and has only reappeared recently in Solaris 11.2. + * Stop trying if we ever fail to read it, so we don't spam the log. + */ + static int l2_size_avail = 1; + if (l2_size_avail && za_read_gauge (ksp, "l2_size", "cache_size", "L2") != 0) + l2_size_avail = 0; /* Operations */ za_read_derive (ksp, "deleted", "cache_operation", "deleted");