+ 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,
+ "used", used, "free", free,
+ other_name, other_value, NULL);
+ if (values_percentage)
+ plugin_dispatch_multivalue (&vl, 1,
+ "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)
+{
+ value_list_t vl = VALUE_LIST_INIT;
+ value_t v[1];
+
+ v[0].derive = value;
+
+ vl.values = v;
+ vl.values_len = STATIC_ARRAY_SIZE (v);
+ sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+ sstrncpy (vl.plugin, "swap", sizeof (vl.plugin));
+ sstrncpy (vl.type, "swap_io", sizeof (vl.type));