Skip to main content

Introduction

💡Try the Sandbox
Try an interactive sandbox where you can explore Memfault without having to sign up.

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​

The Memfault Linux SDK is centered around Memfault's Linux daemon, memfaultd. memfaultd is a lightweight program designed to run as a service on a Linux system to capture logs, metrics, coredumps, and reboots and upload them to Memfault. memfaultctl, a command line interface to control memfaultd, and memfault-core-handler, specifically designed to capture coredumps generated by crashes on the system, are installed alongside memfaultd automatically.

Overview of the Memfault Linux SDK

Dotted lines represent runtime configuration, and solid lines represent flow of data.

Our Linux SDK (just as MCU and Android) is distributed in source available 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. This Yocto layer provides a reproducible way to add Memfault to your distro and easily pull in new updates.
  • For users of Debian, Raspbian and Ubuntu, we recommend building memfaultd from source. 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.

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 detect anomalies.

memfaultd can capture a variety of metrics about the health and resource usage of a Linux system out-of-the-box, such as CPU utilization, memory usage, and available disk space. The built-in set of metrics can also be extended with custom StatsD metrics sent to memfaultd's built in StatsD server from applications running on the system.

Crash Monitoring​

memfaultd hooks into the Linux coredump handler to collect coredumps generated anytime a process crashes and automatically upload them to Memfault. 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 in the Memfault app.

Log Collection​

memfaultd collects system logs and uploads them to Memfault for viewing and analysis.

Getting Started​

  • Try running memfaultd on a live Linux system with our Quickstart installer script!
  • 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.
  • Take a look at our QEMU example to get a feel for what using meta-memfault in a complete Yocto distro looks like.