Skip to main content

pman - v2.2.0.4

https://badge.fury.io/py/pman.svg https://travis-ci.org/FNNDSC/pman.svg?branch=master https://img.shields.io/badge/python-3.5%2B-blue.svg

Overview

This repository proves pman – a process manager.

pman

Most simply, pman manages processes, i.e. programs or applications that are run by an underlying system. Typically, these processes are command line applications (i.e. have no GUI) and usually do not interact really with a user at all. The primary purpose of pman is to provide other software agents the ability to execute processes via http.

Originally, pman was designed to track simple processes executed on the local system. In addition, pman keeps a record of the current and historical state of processes that it has executed and is thus able to respond to queries about the processes. Some of the queries that pman can address are

  • state: Is job <XYZ> still running?

  • result: What is the stdout (or stderr) from job <XYZ>?

  • control: Kill job <XYZ>

pman also maintains a persistent human-readable/friendly database-in-the-filesystem of jobs and states of jobs.

Current versions of pman however can use container-based backends (swarm and openshift) to execute processes. In those cases, the internal database of tracking jobs becomes superfluous. Future versions of pman might depreciate the local/internal DB tracking.

Installation

Installation is relatively straightforward, and we recommend using either python virtual environments or docker.

Python Virtual Environment

On Ubuntu, install the Python virtual environment creator

sudo apt install virtualenv virtualenvwrapper

Then, create a directory for your virtual environments e.g.:

mkdir ~/python-envs

You might want to add to your .bashrc file these two lines:

export WORKON_HOME=~/python-envs
source /usr/local/bin/virtualenvwrapper.sh

(Note depending on distro, the virtualenvwrapper.sh path might be

/usr/share/virtualenvwrapper/virtualenvwrapper.sh

Then you can source your .bashrc and create a new Python3 virtual environment:

source .bashrc
mkvirtualenv --python=python3 python_env

To activate or “enter” the virtual env:

workon python_env

To deactivate virtual env:

deactivate

Using the fnndsc/pman dock

The easiest option however, is to just use the fnndsc/pman dock.

docker pull fnndsc/pman

and then run

docker run  --name pman         \
            -v /home:/Users     \
            --rm -ti            \
            fnndsc/pman         \
            --rawmode 1 --http  \
            --port 5010         \
            --listeners 12

Usage

pman usage

For pman detailed information, see the pman wiki page.

ARGS

    [--ip <IP>]

    The IP interface on which to listen.

    [--port <port>]
    The port on which to listen. Defaults to '5010'.

    [--protocol <protcol>]
    The protocol to interpret. Defaults to 'tcp'.

    [--rawmode]
    Internal zmq socket server mode. A value of '1' is usually used
    here.

    [--listeners <numberOfListenerThreads>]
    The number of internal threads to which requests are dispatched.

    [--http]
    Send return strings as HTTP formatted replies with content-type html.

    [--debugToFile]
    If specified, send debugging results to file.

    [--debugToFile <file>]
    In conjunction with --debugToFile, file which will receive debugging info.

    [--listenerSleep <time>]
    A small delay in the listener loop to prevent busy-wait.
    Default is 0.1 seconds.

    [--directiveFile <directiveFile>]
    The location of a message-conformant <directiveFile>. If this file
    if found by the FileIO thread, its contents will be read and
    executed, after which the file will be deleted.

    [--DBsavePeriod <time>]
    The periodicity in seconds for the internal DB save.

    [--enableTokenAuth]
    Enables token based authorization and can be configured to look for a .ini
    file or an openshift secret.

    [--tokenPath <tokenPath>]
    Specify the absolute path to the token in the file system.
    By default, this looks for the pfiohConfig.ini file in the current working directory.

    [-x|--desc]
    Provide an overview help page.

    [-y|--synopsis]
    Provide a synopsis help summary.

    [--version]
    Print internal version number and exit.

    [-v|--verbosity <level>]
    Set the verbosity level. "0" typically means no/minimal output. Allows for
    more fine tuned output control as opposed to '--quiet' that effectively
    silences everything.

    --container-env <env>
    The container env within which to run.

EXAMPLES

Start pman with 12 listeners:

pman                                                        \\
        --ip 127.0.0.1                                      \\
        --port 5010                                         \\
        --rawmode 1                                         \\
        --http                                              \\
        --listeners 12                                      \\
        --verbosity 1

Metadata

Release files for pman 2.2.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pman 2.2.0.4
File Size Uploaded
pman-2.2.0.4.tar.gz 43.0 kB Details

Release files / pman-2.2.0.4.tar.gz

Download URL pman-2.2.0.4.tar.gz
Size 43.0 kB
Tags Source
SHA-256 checksum
How to use checksums
caa8b36455cd417c46741a77394441dea04084dc2e7e3c10d1b6d95fb4a689eb
BLAKE2b-256 checksum
How to use checksums
be2ef663280b7322a0bc486635d2bde8ed61236fcc468b9cddfebb4bea6c1bd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

2.2.0.4 This release

1 release file

2.0.0.8

1 release file

2.0.0.6

1 release file

2.0.0.4

1 release file

1.6.5

1 release file

1.6.4

1 release file

1.6.3

1 release file

1.6.2

1 release file

1.6.1

1 release file

1.6.0

1 release file

1.5.8

1 release file

1.5.7

1 release file

1.5.6

1 release file

1.5.5

1 release file

1.5.4

1 release file

1.5.3

1 release file

1.5.2

1 release file

1.5.1

1 release file

1.5.0

1 release file

1.4.3

1 release file

1.4.2

1 release file

1.4.1

1 release file

1.4.0

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.2.5

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.12.7

1 release file

0.12.6

1 release file

0.12.5

1 release file

0.12.4

1 release file

0.12.3

1 release file

0.12.2

1 release file

0.12.1

1 release file

0.12.0

1 release file

0.11.4

1 release file

0.11.3

1 release file

0.11.2

1 release file

0.11.1

1 release file

0.11.0

1 release file

0.10.4

1 release file

0.10.3

1 release file

0.10.2

1 release file

0.10.1

1 release file

0.10

1 release file

0.9.1

1 release file

0.9

1 release file

0.8

1 release file

0.7.1

1 release file

0.7

1 release file

0.6

1 release file

0.5.1

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page