- sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance));
- sstrncpy (vl.type, type, sizeof (vl.type));
- if (type_instance != NULL)
- sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
-
- plugin_dispatch_values (&vl);
-} /* }}} void swap_submit_inst */
-
-static void swap_submit_gauge (const char *plugin_instance, /* {{{ */
- const char *type_instance, gauge_t value)
+ sstrncpy (vl.plugin_instance, plugin_instance,
+ sizeof (vl.plugin_instance));
+ sstrncpy (vl.type, "swap", sizeof (vl.type));
+
+ if (values_absolute)
+ plugin_dispatch_multivalue (&vl, 0, DS_TYPE_GAUGE,
+ "used", used, "free", free,
+ other_name, other_value, NULL);
+ if (values_percentage)
+ plugin_dispatch_multivalue (&vl, 1, DS_TYPE_GAUGE,
+ "used", used, "free", free,
+ other_name, other_value, NULL);
+} /* }}} void swap_submit_usage */
+
+#if KERNEL_LINUX || HAVE_PERFSTAT
+__attribute__((nonnull(1)))
+static void swap_submit_derive (char const *type_instance, /* {{{ */
+ derive_t value)