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.

Prerequisites

Even though support for a broader diversity of setups is planned, the SDK makes the following assumptions:

  • Your project uses Yocto as a build system.
  • It uses systemd as an init system.
  • It uses SWUpdate for OTA (optional if you don't plan to integrate with OTA).
  • It uses collectd for metrics (optional if you don't plan to integrate with Metrics).
  • It uses fluent-bit to collect logs (optional).

If your project diverges from these assumptions, please get in touch. It will likely still work without major changes.

Getting Started

Quick Start

We provide a Docker based Yocto builder pre-configured to build Poky (Yocto reference distribution) with Memfault SDK and run it inside QEMU. This is the easiest way to experiment with our SDK. Follow our Quick Start Guide to run the SDK in a few easy steps.

Integration

Integrating the SDK inside your own Yocto based distribution is described in our integration guide.

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 deduplication features as well as advanced Issue management and monitoring.

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.

Next Steps

Take a look at our Quick Start guide to start using the SDK with a demo image.

Or read our Integration guide to add Memfault SDK to an existing Linux distribution.