X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fhugepages.c;h=dd897356b78017ab8919b35a90915954dd5a2ea6;hb=07ba05937aeaedd683656c3912040950dbf4a152;hp=23db25bfdb6f129a5609c368ad0b4a9a9f4d3a1e;hpb=f25d207699e013bb47c0083fe56b8358a98f6f4d;p=collectd.git diff --git a/src/hugepages.c b/src/hugepages.c index 23db25bf..dd897356 100644 --- a/src/hugepages.c +++ b/src/hugepages.c @@ -35,10 +35,10 @@ static const char g_plugin_name[] = "hugepages"; -static bool g_flag_rpt_numa = 1; -static bool g_flag_rpt_mm = 1; +static bool g_flag_rpt_numa = true; +static bool g_flag_rpt_mm = true; -static bool g_values_pages = 1; +static bool g_values_pages = true; static bool g_values_bytes; static bool g_values_percent; @@ -102,20 +102,20 @@ static void submit_hp(const struct entry_info *info) { if (g_values_pages) { sstrncpy(vl.type, "vmpage_number", sizeof(vl.type)); - plugin_dispatch_multivalue(&vl, /* store_percentage = */ 0, DS_TYPE_GAUGE, - "free", free, "used", used, NULL); + plugin_dispatch_multivalue(&vl, /* store_percentage = */ false, + DS_TYPE_GAUGE, "free", free, "used", used, NULL); } if (g_values_bytes) { 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", + plugin_dispatch_multivalue(&vl, /* store_percentage = */ false, + DS_TYPE_GAUGE, "free", free * page_size, "used", used * page_size, NULL); } if (g_values_percent) { sstrncpy(vl.type, "percent", sizeof(vl.type)); - plugin_dispatch_multivalue(&vl, /* store_percentage = */ 1, DS_TYPE_GAUGE, - "free", free, "used", used, NULL); + plugin_dispatch_multivalue(&vl, /* store_percentage = */ true, + DS_TYPE_GAUGE, "free", free, "used", used, NULL); } }