Package: pman
Table of ContentsOverviewpmanInstallationPython Virtual EnvironmentUsing thefnndsc/pmandockUsageEXAMPLESOverviewThis repository provespman– a process manager.pmanMost simply,pmanmanages 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 ofpmanis to provide other software agents the ability to execute processes viahttp.Originally,pmanwas designed to track simple processes executed on the local system. In addition,pmankeeps 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 thatpmancan address arestate: Is job <XYZ> still running?result: What is the stdout (or stderr) from job <XYZ>?control: Kill job <XYZ>pmanalso maintains a persistent human-readable/friendly database-in-the-filesystem of jobs and states of jobs.Current versions ofpmanhowever can use container-based backends (swarm and openshift) to execute processes. In those cases, the internal database of tracking jobs becomes superfluous. Future versions ofpmanmight depreciate the local/internal DB tracking.InstallationInstallation is relatively straightforward, and we recommend using either python virtual environments or docker.Python Virtual EnvironmentOn Ubuntu, install the Python virtual environment creatorsudoaptinstallvirtualenvvirtualenvwrapperThen, create a directory for your virtual environments e.g.:mkdir~/python-envsYou might want to add to your .bashrc file these two lines:exportWORKON_HOME=~/python-envssource/usr/local/bin/virtualenvwrapper.sh(Note depending on distro, thevirtualenvwrapper.shpath might be/usr/share/virtualenvwrapper/virtualenvwrapper.shThen you can source your .bashrc and create a new Python3 virtual environment:source.bashrcmkvirtualenv--python=python3python_envTo activate or “enter” the virtual env:workonpython_envTo deactivate virtual env:deactivateUsing thefnndsc/pmandockThe easiest option however, is to just use thefnndsc/pmandock.dockerpullfnndsc/pmanand then rundockerrun--namepman\-v/home:/Users\--rm-ti\fnndsc/pman\--rawmode1--http\--port5010\--listeners12UsagepmanusageForpmandetailed information, see thepman 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.EXAMPLESStartpmanwith 12 listeners:pman\\--ip127.0.0.1\\--port5010\\--rawmode1\\--http\\--listeners12\\--verbosity1