Skip to main content

SystemD multi-process manager

Project description

SystemD multi-process manager

Build Status Latest version on PyPI License

SystemD supports multiple processes of the exact same type using templating. However, it's very tedious to scale the number of processes up or down. This script aims to simplify that.

Installation

The script is published on PyPI under the name sdmpm.

  1. Use a tool like pipx or psm to install this script into a dedicated virtualenv: psm install sdmpm
  2. Install using pip: pip install sdmpm (preferably with --user or in a virtualenv)

You can also just download the script directly from Github, it has no external dependencies and is tested on Python 3.5 and higher.

wget https://github.com/anlutro/systemd-multi-process-manager/raw/master/src/sdmpm.py -o /usr/local/bin/sdmpm

Usage

Assuming you have a templated service already configured (i.e. there is an /etc/systemd/system/example@.service), you can use this to determine how many of this process should be running:

$ sdmpm scale example 4

You can also use the standard systemctl commands such as status, start, stop, restart, enable and disable.

You can pass --user which will work just like systemctl --user.

License

The contents of this repository are released under the GPL v3 license. See the LICENSE file included for more information.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sdmpm-0.1.tar.gz (3.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page