Skip to main content

memfaultd Built-in Metrics

Built-in System Metric Collection

With built-in system metric collection enabled, memfaultd captures readings on the state and health of your device which are aggregated as part of Metric Reports uploaded to Memfault.

When built-in system metric collection is enabled, readings from collectd that share a top-level namespace with one of the below metric groups will be dropped. This is to avoid double-counting or aggregating readings that may be calculated differently.

Aggregation Types

Like StatsD metric readings, memfaultd uses different aggregation types internally when aggregating metrics it collects itself. The different aggregation types are listed below:

  • Histogram: An average of all readings captured within a Metric Report, weighted evenly.
  • Gauge: Stores the most recent value for a metric. When a new reading is received, the old value is discarded and replaced with the new reading's value.
  • Counter: A simple monotonically increasing sum. New readings within the duration of a Metric Report are added to the sum of all previous readings captured within that Metric Report.

CPU

MetricDescriptionAggregation Type
cpu/cpu/percent/idleThe percent of time this core spent in the idle stateHistogram
cpu/cpu/percent/systemThe percent of time this core spent in the system stateHistogram
cpu/cpu/percent/userThe percent of time this core spent in the user stateHistogram
cpu/cpu/percent/iowaitThe percent of time this core spent in the iowait stateHistogram
cpu/cpu/percent/softirqThe percent of time this core spent in the softirq stateHistogram
cpu/cpu/percent/niceThe percent of time this core spent in the nice stateHistogram

Memory

MetricDescriptionAggregation Type
memory/memory/freeThe amount of free memory on the system in bytesHistogram
memory/memory/usedThe amount of used memory on the system in bytesHistogram

Temperature

MetricDescriptionAggregation Type
thermal/<thermal zone type>Each thermal zone temperature reading in degrees CelsiusGauge

Network Inferfaces

By default, memfaultd will detect interfaces whose ID starts does not start with lo, tun, or dummy (to avoid automatically tracking virtual interfaces) and monitor them via the following metrics.

A specific set of interfaces can be specified via the metrics.system_metric_collection.network_interfaces configuration.

MetricDescriptionAggregation Type
interface/<interface>/bytes_per_second/rxBytes per second received on this interfaceHistogram
interface/<interface>/bytes_per_second/txBytes per second sent on this interfaceHistogram
interface/<interface>/errors_per_second/rxErrors per second for RX traffic on this interfaceHistogram
interface/<interface>/errors_per_second/txBytes per second for TX traffic on this interfaceHistogram
interface/<interface>/dropped_per_second/rxPackets dropped per second for RX traffic on this interfaceHistogram
interface/<interface>/dropped_per_second/txPackets dropped per second for TX traffic on this interfaceHistogram
interface/<interface>/packets_per_second/rxPackets received per second on this interfaceHistogram
interface/<interface>/packets_per_second/txPackets sent per second on this interfaceHistogram

Process-level Metrics

memfaultd will capture the following metrics for processes specified in the metrics.system_metric_collection.processes configuration.

MetricDescriptionAggregation Type
processes/<name>/cpu/percent/userPercent of time that this process has been scheduled in user modeHistogram
processes/<name>/cpu/percent/systemPercent of time that this process has been scheduled in system modeHistogram
processes/<name>/pagefaults/minorThe number of major faults the process has madeHistogram
processes/<name>/pagefaults/majorThe number of minor faults the process has madeHistogram
processes/<name>/rss_bytesRSS (Resident Set Size) for this process in bytesHistogram
processes/<name>/vm_bytesVirtual memory size for this process in bytesHistogram
processes/<name>/num_bytesNumber of threads in this processHistogram
note

<name> is the filename of the process's executable. If it is longer than 16 characters, it will be truncated to the first 16 characters in the filename.

Disk Space Metrics

By default, memfaultd will detect disks whose ID starts with /dev (such as /dev/sda or /dev/nvme0) and track their disk space with these metrics.

Other disks or partitions can be specified via the metrics.system_metric_collection.disk_space configuration.

MetricDescriptionAggregation Type
disk_space/<disk>/free_bytesBytes on the corresponding disk or partition that are unusedHistogram
disk_space/<disk>/used_bytesBytes on the corresponding disk or partition that are in useHistogram