From 810fcdb167fc77309cc24c0ffb7786368dad5a57 Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Tue, 12 Mar 2019 11:29:04 +0100 Subject: Document aktualizr-resource-control Signed-off-by: Laurent Bonnans --- README.adoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.adoc b/README.adoc index 434c04c..01159a0 100644 --- a/README.adoc +++ b/README.adoc @@ -91,6 +91,7 @@ Your images will also need network connectivity to be able to reach an actual OT * `SOTA_CLIENT_FEATURES` - extensions to aktualizr. The only valid options are `hsm` (to build with HSM support) and `secondary-network` (to set up a simulated 'in-vehicle' network with support for a primary node with a DHCP server and a secondary node with a DHCP client). * `SOTA_SECONDARY_CONFIG_DIR` - a directory containing JSON configuration files for virtual secondaries on the host. These will be installed into `/etc/sota/ecus` on the device and automatically provided to aktualizr. * `SOTA_HARDWARE_ID` - a custom hardware ID that will be written to the aktualizr config. Defaults to MACHINE if not set. +* `RESOURCE_xxx_pn-aktualizr` - controls maximum resource usage of the aktualizr service, when `aktualizr-resource-control` is installed on the image. See <> for details. == Usage @@ -156,6 +157,19 @@ Second, you can write recipes to install additional config files with customized To use these recipes, you will need to add them to your image with a line such as `IMAGE_INSTALL_append = " aktualizr-log-debug "` in your `local.conf`. +=== aktualizr service resource control + +With systemd based images, it is possible to set resource policies for the aktualizr service. The main use case is to provide a safeguard against resource exhaustion during an unforeseen failure scenario. + +To enable it, install `aktualizr-resource-control` on the target image and optionally override the default resource limits set in link:recipes-sota/aktualizr/aktualizr_git.bb[aktualizr_git.bb], from your `local.conf`. + +For example: + +.... +IMAGE_INSTALL_append += " aktualizr-resource-control " +RESOURCE_CPU_WEIGHT_pn-aktualizr = "50" +.... + == Development configuration There are a few settings that can be controlled in `local.conf` to simplify the development process: -- cgit v1.2.3-54-g00ecf