summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b46de1d)
raw | patch | inline | side by side (parent: b46de1d)
author | Florian Forster <octo@collectd.org> | |
Tue, 20 Mar 2012 21:32:14 +0000 (22:32 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Tue, 20 Mar 2012 21:32:14 +0000 (22:32 +0100) |
src/types.db | patch | blob | history | |
src/zfs_arc.c | patch | blob | history |
diff --git a/src/types.db b/src/types.db
index caf31e721b984e432f44a32978afdd6deabab85c..d818b937a4f49ca1254c1db40a29354698ff2f70 100644 (file)
--- a/src/types.db
+++ b/src/types.db
ath_stat value:DERIVE:0:U
bitrate value:GAUGE:0:4294967295
bytes value:GAUGE:0:U
+cache_eviction value:DERIVE:0:U
cache_operation value:DERIVE:0:U
cache_ratio value:GAUGE:0:100
cache_result value:DERIVE:0:U
email_count value:GAUGE:0:U
email_size value:GAUGE:0:U
entropy value:GAUGE:0:4294967295
-evict evict_l2_cached:COUNTER:0:U, evict_l2_eligible:COUNTER:0:U, evict_l2_ineligible:COUNTER:0:U
fanspeed value:GAUGE:0:U
file_size value:GAUGE:0:U
files value:GAUGE:0:U
diff --git a/src/zfs_arc.c b/src/zfs_arc.c
index a298706fbae77be6e3588774ca123c19f5e3f8b3..8b4c788562ba4c759bb897102836283e6fab409e 100644 (file)
--- a/src/zfs_arc.c
+++ b/src/zfs_arc.c
za_submit_gauge ("cache_ratio", type_instance, ratio);
}
-static void za_submit_evict_counts (counter_t evict_l2_cached, counter_t evict_l2_eligible,
- counter_t evict_l2_ineligible)
-{
- value_t values[3];
-
- values[0].counter = evict_l2_cached;
- values[1].counter = evict_l2_eligible;
- values[2].counter = evict_l2_ineligible;
-
- za_submit ("evict", "counts", values, STATIC_ARRAY_SIZE(values));
-}
-
-static void za_submit_mutex_counts (counter_t mutex_miss)
+static void za_submit_mutex_counts (derive_t mutex_miss)
{
value_t values[1];
evict_l2_eligible = get_kstat_value(ksp, "evict_l2_eligible");
evict_l2_ineligible = get_kstat_value(ksp, "evict_l2_ineligible");
+ za_submit_derive ("cache_eviction", "cached", evict_l2_cached);
+ za_submit_derive ("cache_eviction", "eligible", evict_l2_eligible);
+ za_submit_derive ("cache_eviction", "ineligible", evict_l2_ineligible);
+
hash_collisions = get_kstat_value(ksp, "hash_collisions");
/* Hits / misses */
za_submit ("io_octets", "L2", l2_io, /* num values = */ 2);
- za_submit_evict_counts (evict_l2_cached, evict_l2_eligible, evict_l2_ineligible);
-
za_submit_mutex_counts (mutex_miss);
za_submit_deleted_counts (deleted);