Skip to main content

simple process manager

Project description

PMO - Process Manager Omni

A lightweight process manager inspired by PM2, but designed primarily for development environments.

Features

  • start, stop, and restart services, similar to PM2
  • Simple YAML configuration
  • Real-time logs with highlight
  • Environment variable support
  • Automatic .env file loading
  • Multi-machine support with hostname-specific directories (for shared NAS environments)

Installation

pip install pmo

Usage

Quick Start

  1. Create a pmo.yml file in your project:
# Simple format, just like procfile
web-server: node server.js

# Detailed format
api-server:
  cmd: python api.py
  cwd: ./api
  env:
    NODE_ENV: development
  1. Optional: Create a .env file for shared environment variables:
# This will apply to all services
DATABASE_URL=postgres://localhost:5432/mydb
DEBUG=true
  1. Start your services:
pmo start
  1. List your services:
pmo ls

Output:

+---------------------------------------------------------------------------------------------------------------------+
|  id  | name      |        pid |   uptime |   status    |        cpu |        mem |    gpu mem | gpu id | user       |
|------+-----------+------------+----------+-------------+------------+------------+------------+--------+------------|
|  0   | vllm-1    |     482950 |  25m 15s |   running   |       0.0% |        1mb |  20632 MiB |   0    | simpx      |
|  1   | sglang-1  |     482952 |  25m 15s |   running   |       0.0% |        1mb |  20632 MiB |   1    | simpx      |
|  2   | vllm-2    |     482954 |  25m 15s |   running   |       0.0% |        1mb |  20632 MiB |   2    | simpx      |
+---------------------------------------------------------------------------------------------------------------------+

Commands

pmo start   [all | service-name | service-id]
pmo stop    [all | service-name | service-id]
pmo restart [all | service-name | service-id]
pmo log     [all | service-name | service-id]
pmo flush   [all | service-name | service-id]
pmo dry-run [all | service-name | service-id]
pmo ls

Configuration

The pmo.yml file supports two formats:

  1. Simple: service-name: command
  2. Detailed:
    service-name:
      cmd: command
      cwd: working directory (optional)
      env:
        KEY: value
    

PMO manages runtime data in the .pmo directory with logs and PID files.

Multi-machine Support

PMO now supports multiple machines sharing the same configuration through a shared filesystem (like NAS). Each machine will store its process information in a hostname-specific directory:

.pmo/
  hostname1/
    pids/
    logs/
  hostname2/
    pids/
    logs/

This allows processes on different machines to be managed separately even when sharing the same configuration files.

License

MIT

Project details


Download files

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

Source Distribution

pmo-0.3.18.tar.gz (35.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pmo-0.3.18-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file pmo-0.3.18.tar.gz.

File metadata

  • Download URL: pmo-0.3.18.tar.gz
  • Upload date:
  • Size: 35.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pmo-0.3.18.tar.gz
Algorithm Hash digest
SHA256 10b9d2fbba58a51c690818f17eff7ad715ea84ba039b073c0447b83c7dffecbe
MD5 1491cbaaa59e2f695caf17ecb296f912
BLAKE2b-256 fc1e8c98239ba43ab2d23fbc4f08756b8eb48412c680e3db144b9e3d2a3fa9c2

See more details on using hashes here.

File details

Details for the file pmo-0.3.18-py3-none-any.whl.

File metadata

  • Download URL: pmo-0.3.18-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pmo-0.3.18-py3-none-any.whl
Algorithm Hash digest
SHA256 0ce8b3925cfdba0ae60e008c9d661cef28454c8effab0799709f6962e6ddfcd2
MD5 a030f42884e5666eb77638b214c81135
BLAKE2b-256 f9f4f1cdbac64203f1c81c84aaafe419f0b1bbe0bef5c64acb314deb36a85dd0

See more details on using hashes here.

Supported by

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