Skip to content

Memfault SDK for embedded Linux systems. Observability, logging, crash reporting, and updating all in one service. More information at https://docs.memfault.com.

License

Notifications You must be signed in to change notification settings

memfault/memfault-linux-sdk

Repository files navigation

Memfault Linux SDK

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 consists of a combination of existing open-source software and a daemon memfaultd that orchestrates and configures it. It also implements additional features such as tracking of reboot reason tracking, and in the future reporting crashes and logs.

Overview of the Memfault Linux SDK

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

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.

Quickstart

To get started in minutes using the QEMU emulator, read our [Quick Start with QEMU guide][quickstart-qemu].

If you have a Raspberry Pi available, the [Quick Start with Raspberry Pi guide] [quickstart-rpi] will walk you through building a complete system image, flashing it to an SDCard and updating your device remotely with Memfault OTA.

Prerequisites

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

  • Your project uses Yocto as a build system.
  • It uses SWUpdate for OTA (optional if you don't plan to integrate with OTA).

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

Getting Started

Take a look at our getting-started guide to set up your integration.

OTA/Release Management is currently fully supported through an off-the-shelf integration with the SWUpdate agent. Read more about it in the OTA integration guide.

Metrics are also supported through collectd. Read more about it in the Linux Metrics integration guide.

Documentation and Features

An 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.

Read more about Linux OTA management using Memfault.

Metrics

The Memfault Linux SDK relies on collectd for the collection and transmission of metrics. Application metrics can be sent to collectd by means of statsd.

Read more about Linux metrics using Memfault.

Crash Reports

To collect and upload user-land coredumps, the Memfault Linux SDK relies the standard kernel coredump feature, and so does not need to make use of any additional dependencies. Read more about coredumps using the Memfault Linux SDK.

Reboot Reason Tracking

Memfault will detect various reboot reasons from the system and report them to the Memfault Dashboard. Users can also provide a specific reboot reason before restarting the device. Read more about reboot reason tracking using the Memfault Linux SDK.

Log files

System logs are captured by fluent-bit and forwarded to Memfault Linux SDK.

Logs are compressed, stored locally and uploaded when the device connects to the Internet.

For more information on how to configure log file support, please refer to the linux logging guide