A Metric Set is a collection of Metric values. Metric Sets are typically created by the Sampler daemon at the monitored element and updated periodically with the current value of each Metric.
A metric set consists of two pieces: the meta-data, and the data. The meta-data describes each of the metrics and includes the following:
- A character string indicating it’s name,
- A type, e.g. unsigned 32b integer, 64b integer, string, etc…
- A volatility, i.e. data or meta-data
The metric set data consists of the value of each metric, unless the volatility is ‘meta-data’ in which case it’s value is kept with the meta-data.
The peer uses the ldms_lookup() function to obtain a copy of the meta-data for the metric set, and the ldms_update() function to read the data for the metric set. The reason for the distinction is that the meta-data is typically 5-10 times larger than the data itself.
The Aggregator daemon will typically call ldms_lookup() once, and the ldms_update() periodically to obtain the most recent values for the metrics. If the meta-data does change for the metric set, the ldms_update() function will detect this case and automatically update the meta-data as well.