summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8003c13)
raw | patch | inline | side by side (parent: 8003c13)
author | Kevin Bowling <kbowling@llnw.com> | |
Mon, 4 Apr 2016 09:11:33 +0000 (02:11 -0700) | ||
committer | Kevin Bowling <kbowling@llnw.com> | |
Mon, 4 Apr 2016 09:11:33 +0000 (02:11 -0700) |
src/disk.c | patch | blob | history |
diff --git a/src/disk.c b/src/disk.c
index 85b2329945e929baf6dc733a8510d557382a63a3..05a863fb01666cd1764c880cc462c30e337738d6 100644 (file)
--- a/src/disk.c
+++ b/src/disk.c
plugin_dispatch_values (&vl);
} /* void disk_submit */
-#if KERNEL_LINUX
-static void submit_in_progress (char const *disk_name, gauge_t in_progress)
+static void submit_io_time (char const *plugin_instance, derive_t io_time, derive_t weighted_time)
{
- value_t v;
+ value_t values[2];
value_list_t vl = VALUE_LIST_INIT;
- if (ignorelist_match (ignorelist, disk_name) != 0)
+ if (ignorelist_match (ignorelist, plugin_instance) != 0)
return;
- v.gauge = in_progress;
+ values[0].derive = io_time;
+ values[1].derive = weighted_time;
- vl.values = &v;
- vl.values_len = 1;
+ vl.values = values;
+ vl.values_len = 2;
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "disk", sizeof (vl.plugin));
- sstrncpy (vl.plugin_instance, disk_name, sizeof (vl.plugin_instance));
- sstrncpy (vl.type, "pending_operations", sizeof (vl.type));
+ sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance));
+ sstrncpy (vl.type, "disk_io_time", sizeof (vl.type));
plugin_dispatch_values (&vl);
-}
+} /* void submit_io_time */
-static void submit_io_time (char const *plugin_instance, derive_t io_time, derive_t weighted_time)
+#if KERNEL_LINUX
+static void submit_in_progress (char const *disk_name, gauge_t in_progress)
{
- value_t values[2];
+ value_t v;
value_list_t vl = VALUE_LIST_INIT;
- if (ignorelist_match (ignorelist, plugin_instance) != 0)
+ if (ignorelist_match (ignorelist, disk_name) != 0)
return;
- values[0].derive = io_time;
- values[1].derive = weighted_time;
+ v.gauge = in_progress;
- vl.values = values;
- vl.values_len = 2;
+ vl.values = &v;
+ vl.values_len = 1;
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "disk", sizeof (vl.plugin));
- sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance));
- sstrncpy (vl.type, "disk_io_time", sizeof (vl.type));
+ sstrncpy (vl.plugin_instance, disk_name, sizeof (vl.plugin_instance));
+ sstrncpy (vl.type, "pending_operations", sizeof (vl.type));
plugin_dispatch_values (&vl);
}