Enables or disables reporting of physical memory usage in absolute numbers,
i.e. bytes. Defaults to B<true>.
-=item B<ValuesPercentage> B<false>|B<true>
+=item B<ReportUtilization> B<false>|B<true>
-Enables or disables reporting of physical memory usage in percentages, e.g.
-percent of physical memory used. Defaults to B<false>.
+Enables or disables reporting of physical memory usage as a ratio of total
+memory, e.g. the fraction of physical memory used. Defaults to B<false>.
This is useful for deploying I<collectd> in a heterogeneous environment in
which the sizes of physical memory vary.
#endif
static bool report_usage = true;
-static bool values_percentage;
+static bool report_utilization;
static int memory_config(oconfig_item_t *ci) /* {{{ */
{
if (strcasecmp("ReportUsage", child->key) == 0 ||
strcasecmp("ValuesAbsolute", child->key) == 0)
cf_util_get_boolean(child, &report_usage);
- else if (strcasecmp("ValuesPercentage", child->key) == 0)
- cf_util_get_boolean(child, &values_percentage);
+ else if (strcasecmp("ReportUtilization", child->key) == 0 ||
+ strcasecmp("ValuesPercentage", child->key) == 0)
+ cf_util_get_boolean(child, &report_utilization);
else
ERROR("memory plugin: Invalid configuration option: \"%s\".", child->key);
}
}
metric_family_metric_reset(&fam_usage);
- if (!values_percentage) {
+ if (!report_utilization) {
return ret;
}