SystemD multi-process manager
Project description
SystemD multi-process manager
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
.
- Use a tool like pipx or psm to install this script into a dedicated virtualenv:
psm install sdmpm
- 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file sdmpm-0.1.tar.gz
.
File metadata
- Download URL: sdmpm-0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78b39c30b753edd200ce3dcad0b8ff39a4c601ac34ef9e6d25d399aefec599c9 |
|
MD5 | bf83b6c0883ed8b54fd73c0f39f27f95 |
|
BLAKE2b-256 | fbfbd0f2bd8071a11eedf840803a4532aebd32958a9a48b00e06e8502d1ba4aa |