Skip to main content

Introduction

Ship hardware products at the speed of software. With Memfault, you can continuously monitor devices, debug firmware issues, and deploy OTA updates to your fleet.

Overview

To provide core Memfault platform features, the Memfault Linux SDK relies on well-established, battle-tested open-source software. The daemon memfaultd implements Memfault-specific features and also acts as a configuration agent. memfaultctl is a command line utility to adjust memfaultd configuration and trigger specific events for testing purposes.

Overview of the Memfault Linux SDK

Dotted lines represent runtime configuration, and solid lines represent flow of data. Faded-out elements represent upcoming features.

Our Linux SDK (just as MCU and Android) is distributed in source form.

Supported Linux Variants

Memfault will run on any Linux system.

  • For users of Yocto, we provide a Yocto layer. The Yocto Integration Guide provides detailed instructions on how to integrate the SDK into your Yocto build.
  • For users of Debian, Raspbian and Ubuntu, we recommend building memfaultd from source and installing recommended dependencies via the package manager. The Cross Compilation guide guide provides detailed instructions on how to cross-compile memfaultd for your target architecture and install required dependencies.
  • For users of Buildroot and OpenWRT, we currently also recommend following the Cross-Compilation guide guide to cross-compile the SDK for your target architecture and generate a binary.
    An alternative is to write a recipe for your build system that builds the SDK from source. We will be publishing such recipes in the future.
  • For every other build system or distribution, building the SDK from source is our recommended option at the moment. Contact us with the details of your setup so we can help you get started.

Memfault for Linux can run and capture reboots, coredumps and some basic metrics without any dependencies. However, to get the most out of Memfault, we recommend the following:

  • For OTA, we recommend using SWUpdate and provide detailed instructions in the OTA with SWUpdate guide.
    • Memfault OTA solution is flexible enough to accommodate a lot of different OTA solutions. Our Generic OTA guide covers how to use Memfault with any OTA solution including RAUC, SWUpdate and Mender.
  • To capture metrics from your system, we recommend using collectd and provide detailed instructions in the Metrics with collectd guide.
  • To capture system logs, we recommend using fluent-bit. See the Logging guide for more details.

Documentation and Features

If you are not familiar with Memfault, we recommend visiting our features overview for a generic introduction to all the major features of the Memfault platform.

Detailed documentation for each feature of the Memfault Linux SDK can be found in our subsystem guides.

Yocto Integration Example

A complete Yocto integration example can be found under /meta-memfault-example. The central part of the SDK lives in a Yocto layer in /meta-memfault.

OTA Updates

To provide OTA Updates, the Memfault Cloud implements an API endpoint compatible with the hawkBit DDI API. Various clients are available, but memfaultd supports SWUpdate out of the box and is able to configure it to talk to our hawkBit DDI-compatible endpoint.

Metrics

Use metrics and diagnostic data to measure the success of software updates (OTA) and to proactively diagnose anomalies before users even experience their effect. The SDK ships with a configurable set of plugins for collectd to obtain standard KPIs at the operating system level (e.g. available storage or RAM, CPU utilization, or network status and traffic). You can also use the SDK to collect product-specific custom metrics via statsd.

Crash Reports

Collect coredumps and automatically upload them to the Memfault platform. Use Memfault's rich backtrace and trace analysis view in order to debug issues and keep your fleet's crashes under control. Make use of Memfault's advanced Issue management and monitoring features.

Reboot Reason Tracking

The Reboot Reason Tracking feature allows one to collect why devices are rebooting in the field (whether it be due to a crash, kernel panic or a firmware update). Summaries and aggregates can then be viewed from the Memfault web application.

Log Collection

Memfaultd can integrate with fluent-bit to collect logs from your embedded systems and regularly upload them to Memfault platform. Fluent-bit supports a wide variety of inputs, including kernel logs and systemd logs.

Collected logs are visible in Memfault dashboard in the details page of your devices.

These features are fully in the domain of Memfault Linux SDK.

Getting Started

  • Take a look at our Quick Start guide to start using the SDK with a demo image built with Yocto, running in QEMU or on a Raspberry Pi.
  • Follow our Yocto Integration guide to add Memfault SDK to your existing Yocto build.
  • Cross-compile Memfault for your target architecture and start using Memfault today with any Linux distribution.