X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fzfs_arc.c;h=3a54ad8d57d92c97a6ef9b2050c8b68e02fef682;hp=96ffc54957aae84a8fb548e3df352307a9a9d168;hb=51612a1b2f96f6e360f874f6da0b20eac94f48b3;hpb=9708614487ec93df67ad1095f3cf5a0987b9cc28 diff --git a/src/zfs_arc.c b/src/zfs_arc.c index 96ffc549..3a54ad8d 100644 --- a/src/zfs_arc.c +++ b/src/zfs_arc.c @@ -158,7 +158,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");