-V, --version | Outputs the version number |
-v | Gets version |
-s, --silent | Hides all messages |
-m, --mini-list | Displays a compacted list without formatting |
-f, --force | Forces actions |
--disable-logs | Do not write logs |
-n, --name <name> | Sets a name for script |
-i, --instances <number> | Launches [number] instances (for networked app)(load balanced) |
--parallel <number> | Number of parallel actions (for restart/reload) |
-l, --log [path] | Specifies entire log file (error and out are both included) |
-o, --output <path> | Specifies out log file |
-e, --error <path> | Specifies error log file |
-p, --pid <pid> | Specify pid file |
-k, --kill-timeout <delay> | Delays before sending final SIGKILL signal to process |
--listen-timeout <delay> | Listen timeout on application reload |
--max-memory-restart <memory> | Specify max memory amount used to autorestart (in octet or use syntax like 100M) |
--restart-delay <delay> | Specify a delay between restarts (in milliseconds) |
--env <Environment Name> | Specify environment to get specific env variables |
--log-type <type> | Specify log output style (raw by default, json optional) |
-x, --execute-command | Execute a program using fork system |
--max-restarts [Count] | Only Restart the script COUNT times |
-u, --user <username> | Defines user when generating startup script |
--uid <uid> | Runs target script with <uid> rights |
--gid <gid> | Runs target script with <gid> rights |
--cwd <path> | Runs target script as <username> |
--hp <home path> | Defines home path when generating startup script |
--wait-ip | Overrides systemd script to wait for full internet connectivity to launch pm2 |
--service-name <name> | Defines service name when generating startup script |
-c, --cron <Cron Pattern> | Restarts a running process based on a cron pattern |
-w, --write | Writes configuration in local folder |
--interpreter <interpreter> | The interpreter pm2 should use for executing app (bash, python…) |
--interpreter-args <Arguments> | Interprets options (alias of –node-args) |
--log-date-format <Date Format> | Adds custom prefix timestamp to logs |
--no-daemon | Runs pm2 daemon in the foreground if it doesn’t exist already |
-a, --update-env | Updates environment on restart/reload (-a <=> apply) |
–-source-map-support | Force source map support |
–-only <app name> | With json declaration, allow to only act on one application |
–-disable-source-map-support | Force source map support |
–-wait-ready | Asks pm2 to wait for ready event from your app |
–-merge-logs | Merges logs from different instances but keep error and out separated |
–-watch <paths...> | Watches application folder for changes (default: ) |
–-ignore-watch <Folder or Files...> | Folder/files to be ignored watching |
–-node-args <Node Args> | Space delimited arguments to pass to node in cluster mode |
–-no-color | Skip colors |
–-no-vizion | Starts an app without vizion feature (versioning control) |
–-no-autorestart | Starts an app without automatic restart |
–-no-treekill | Only kills the main process, not detached children |
–-no-pmx | Starts an app without apm |
–-no-automation | Starts an app without apm |
–-trace | Enables transaction tracing with km |
–-disable-trace | Disables transaction tracing with km |
–-attach | Attaches logging after your start/restart/stop/reload |
–-sort <field name> | Sort process according to field’s name |
–-v8 | Enables v8 data collecting |
–-event-loop-inspector | Enables event-loop-inspector dump in apm |
–-deep-monitoring | Enables all monitoring tools (equivalent to –v8 –event-loop-inspector –trace) |
-h, –-help | Outputs usage information |