#include "common.h" /* auxiliary functions */
#include "plugin.h" /* plugin_register_*, plugin_dispatch_values */
#include "common.h" /* auxiliary functions */
#include "plugin.h" /* plugin_register_*, plugin_dispatch_values */
-static _Bool values_pages = 1;
-static _Bool values_bytes = 0;
-static _Bool values_percent = 0;
+static _Bool g_values_pages = 1;
+static _Bool g_values_bytes = 0;
+static _Bool g_values_percent = 0;
else if (strcasecmp("ReportRootHP", child->key) == 0)
cf_util_get_boolean(child, &g_flag_rpt_mm);
else if (strcasecmp("ValuesPages", child->key) == 0)
else if (strcasecmp("ReportRootHP", child->key) == 0)
cf_util_get_boolean(child, &g_flag_rpt_mm);
else if (strcasecmp("ValuesPages", child->key) == 0)
- ssnprintf(vl.plugin_instance, sizeof(vl.plugin_instance), "%s-%zuKb",
- info->node, info->page_size_kb);
+ snprintf(vl.plugin_instance, sizeof(vl.plugin_instance), "%s-%zuKb",
+ info->node, info->page_size_kb);
- ssnprintf(vl.plugin_instance, sizeof(vl.plugin_instance), "%zuKb",
- info->page_size_kb);
+ snprintf(vl.plugin_instance, sizeof(vl.plugin_instance), "%zuKb",
+ info->page_size_kb);
sstrncpy(vl.type, "vmpage_number", sizeof(vl.type));
plugin_dispatch_multivalue(&vl, /* store_percentage = */ 0, DS_TYPE_GAUGE,
"free", free, "used", used, NULL);
}
sstrncpy(vl.type, "vmpage_number", sizeof(vl.type));
plugin_dispatch_multivalue(&vl, /* store_percentage = */ 0, DS_TYPE_GAUGE,
"free", free, "used", used, NULL);
}
gauge_t page_size = (gauge_t)(1024 * info->page_size_kb);
sstrncpy(vl.type, "memory", sizeof(vl.type));
plugin_dispatch_multivalue(&vl, /* store_percentage = */ 0, DS_TYPE_GAUGE,
"free", free * page_size, "used",
used * page_size, NULL);
}
gauge_t page_size = (gauge_t)(1024 * info->page_size_kb);
sstrncpy(vl.type, "memory", sizeof(vl.type));
plugin_dispatch_multivalue(&vl, /* store_percentage = */ 0, DS_TYPE_GAUGE,
"free", free * page_size, "used",
used * page_size, NULL);
}
sstrncpy(vl.type, "percent", sizeof(vl.type));
plugin_dispatch_multivalue(&vl, /* store_percentage = */ 1, DS_TYPE_GAUGE,
"free", free, "used", used, NULL);
sstrncpy(vl.type, "percent", sizeof(vl.type));
plugin_dispatch_multivalue(&vl, /* store_percentage = */ 1, DS_TYPE_GAUGE,
"free", free, "used", used, NULL);
- ssnprintf(path2, sizeof(path2), "%s/%s", path, entry);
+ snprintf(path2, sizeof(path2), "%s/%s", path, entry);
- ssnprintf(path2, sizeof(path2), "%s/%s", path, result->d_name);
+ snprintf(path2, sizeof(path2), "%s/%s", path, result->d_name);
- ssnprintf(path, sizeof(path), sys_node_hugepages, result->d_name);
+ snprintf(path, sizeof(path), sys_node_hugepages, result->d_name);