Skip to main content

Like pm2 without node.js ;-)

Project description

PM3

Like pm2 without node.js ;-)

PM3 CheatSheet:

Install and update

pip install pm3             # Install pm3
pip install -U pm3          # Upgrade pm3

Start

pm3 daemon start    # Start process with default ~/.pm3/config.ini configuration 
pm3 ping            # Ensure pm3 daemon has been launched

Create new process

pm3 new '/bin/sleep 10' -n sleep10                  # Create a new process with name sleep10
pm3 new '/bin/sleep 10' -n sleep10 --autorun        # Create a new process with autorun option

Actions

pm3 start sleep10   # Start process with name sleep10
pm3 start 1         # Start process with id 1
pm3 restart all     # Restart all process
pm3 stop 2          # Stop process with id 2 
pm3 rm 3            # Stop and delete process with id 3

Listing

pm3 ls                 # Display all processes
pm3 ls -l              # Display all processes in list format
pm3 ps 5               # Display process 5 status
pm3 ps -l ALL          # Display ALL processes (hidden or not) status in list format

Dump and Load

pm3 dump 2                  # Print process 2 configuration in JSON
pm3 dump all -f dump.json   # Save all configuration processes in dump.json file 
pm3 load dump.json          # Load all configuration processes from dump.json file 

Logs

pm3 log            # Display all processes logs
pm3 log 5 -f       # Display and follow log of process 5
pm3 err 2 -n 50    # Display last 50 rows of process 5 error log 

Useful script generation

pm3 make_script systemd     # Generate script for install startup systemd configuration
pm3 make_script pm3_edit    # Generate script for edit process configuration on the fly 

Misc

pm3 reset <process>     # Reset meta data (restarted time...)
pm3 ping                # Ensure pm3 daemon has been launched
pm3 -h                  # General help
pm3 new -h              # Help of new subcommand  

Autocompletition (experimental)

Bash

pm3_exe=$(which pm3)
eval "$(register-python-argcomplete $pm3_exe)"

Fish

pm3_exe=$(which pm3)
register-python-argcomplete --shell fish $pm3_exe | source

or

register-python-argcomplete --shell fish $pm3_exe > ~/.config/fish/completions/pm3.fish

Other shell

visit https://kislyuk.github.io/argcomplete/

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

PM3-0.3.4.tar.gz (28.2 kB view details)

Uploaded Source

Built Distribution

PM3-0.3.4-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file PM3-0.3.4.tar.gz.

File metadata

  • Download URL: PM3-0.3.4.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for PM3-0.3.4.tar.gz
Algorithm Hash digest
SHA256 0cb8f42fae0e3845b86b07d9039159d68c05edb29ca91e6af1b5d84caae8a623
MD5 881a89160684e99ebf33e6b8f96473d4
BLAKE2b-256 64490ce8f66d448f43ff628b9f4ecf9a1e940e7b0f105cb1d0175ff842f40d50

See more details on using hashes here.

File details

Details for the file PM3-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: PM3-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for PM3-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6cbe5d65ce234a0d16956d1518a2137f697b4d8d4ace19b437c03641e05bfbf3
MD5 b5e639ab23fa4efdab9b83fd2d5d6663
BLAKE2b-256 d99012ea2f697e81d0c6d4340da92fddddb127cf9005bce821655100940fc33a

See more details on using hashes here.

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