All Projects → Unitech → Pm2

Unitech / Pm2

Licence: other
Node.js Production Process Manager with a built-in Load Balancer.

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Pm2

Sampler
Tool for shell commands execution, visualization and alerting. Configured with a simple YAML file.
Stars: ✭ 9,203 (-74.53%)
Mutual labels:  command-line-tool, command-line, monitoring
Ripgrep
ripgrep recursively searches directories for a regex pattern while respecting your gitignore
Stars: ✭ 28,564 (-20.93%)
Mutual labels:  command-line-tool, command-line
Papis
Powerful and highly extensible command-line based document and bibliography manager.
Stars: ✭ 636 (-98.24%)
Mutual labels:  command-line-tool, command-line
Stronghold
Easily configure macOS security settings from the terminal.
Stars: ✭ 813 (-97.75%)
Mutual labels:  command-line-tool, command-line
Jsonui
jsonui is an interactive JSON explorer on your command line
Stars: ✭ 583 (-98.39%)
Mutual labels:  command-line-tool, command-line
Sultan
Sultan: Command and Rule over your Shell
Stars: ✭ 625 (-98.27%)
Mutual labels:  command-line-tool, command-line
Awesome Sre
A curated list of Site Reliability and Production Engineering resources.
Stars: ✭ 7,687 (-78.72%)
Mutual labels:  monitoring, production
Processhacker
A free, powerful, multi-purpose tool that helps you monitor system resources, debug software and detect malware.
Stars: ✭ 6,285 (-82.6%)
Mutual labels:  monitoring, process-manager
Laminas Cli
Console command runner, exposing commands written in Laminas MVC and Mezzio components and applications
Stars: ✭ 25 (-99.93%)
Mutual labels:  command-line-tool, command-line
Text Minimap
Generate text minimap/preview using Braille Patterns
Stars: ✭ 21 (-99.94%)
Mutual labels:  command-line-tool, command-line
Ecsctl
Command-line tool for managing AWS Elastic Container Service and Projects to run on it.
Stars: ✭ 15 (-99.96%)
Mutual labels:  command-line-tool, command-line
Broot
A new way to see and navigate directory trees : https://dystroy.org/broot
Stars: ✭ 6,362 (-82.39%)
Mutual labels:  command-line-tool, command-line
Cli
A command-line interface for Hetzner Cloud
Stars: ✭ 542 (-98.5%)
Mutual labels:  command-line-tool, command-line
Spicetify Cli
Commandline tool to customize Spotify client. Supports Windows, MacOS and Linux.
Stars: ✭ 9,316 (-74.21%)
Mutual labels:  command-line-tool, command-line
Cbt
CBT - fun, fast, intuitive, compositional, statically checked builds written in Scala
Stars: ✭ 489 (-98.65%)
Mutual labels:  command-line-tool, command-line
Terjira
Terjira is a very interactive and easy to use CLI tool for Jira.
Stars: ✭ 713 (-98.03%)
Mutual labels:  command-line-tool, command-line
Composer Git Hooks
Easily manage git hooks in your composer config
Stars: ✭ 838 (-97.68%)
Mutual labels:  command-line-tool, command-line
Dateutils
nifty command line date and time utilities; fast date calculations and conversion in the shell
Stars: ✭ 458 (-98.73%)
Mutual labels:  command-line-tool, command-line
Node.cli Progress
⌛️ easy to use progress-bar for command-line/terminal applications
Stars: ✭ 466 (-98.71%)
Mutual labels:  command-line-tool, command-line
Przm
🎨 A simple, yet feature rich color picker and manipulator
Stars: ✭ 17 (-99.95%)
Mutual labels:  command-line-tool, command-line

pm2 logo

P(rocess) M(anager) 2
Runtime Edition

Downloads per Month Downloads per Year npm version Build Status


PM2 is a production process manager for Node.js applications with a built-in load balancer. It allows you to keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks.

Starting an application in production mode is as easy as:

$ pm2 start app.js

PM2 is constantly assailed by more than 1800 tests.

Official website: https://pm2.keymetrics.io/

Works on Linux (stable) & macOS (stable) & Windows (stable). All Node.js versions are supported starting Node.js 12.X.

Installing PM2

With NPM:

$ npm install pm2 -g

You can install Node.js easily with NVM or ASDF.

Start an application

You can start any application (Node.js, Python, Ruby, binaries in $PATH...) like that:

$ pm2 start app.js

Your app is now daemonized, monitored and kept alive forever.

Managing Applications

Once applications are started you can manage them easily:

Process listing

To list all running applications:

$ pm2 list

Managing apps is straightforward:

$ pm2 stop     <app_name|namespace|id|'all'|json_conf>
$ pm2 restart  <app_name|namespace|id|'all'|json_conf>
$ pm2 delete   <app_name|namespace|id|'all'|json_conf>

To have more details on a specific application:

$ pm2 describe <id|app_name>

To monitor logs, custom metrics, application information:

$ pm2 monit

More about Process Management

Cluster Mode: Node.js Load Balancing & Zero Downtime Reload

The Cluster mode is a special mode when starting a Node.js application, it starts multiple processes and load-balance HTTP/TCP/UDP queries between them. This increase overall performance (by a factor of x10 on 16 cores machines) and reliability (faster socket re-balancing in case of unhandled errors).

Framework supported

Starting a Node.js application in cluster mode that will leverage all CPUs available:

$ pm2 start api.js -i <processes>

<processes> can be 'max', -1 (all cpu minus 1) or a specified number of instances to start.

Zero Downtime Reload

Hot Reload allows to update an application without any downtime:

$ pm2 reload all

More informations about how PM2 make clustering easy

Container Support

With the drop-in replacement command for node, called pm2-runtime, run your Node.js application in a hardened production environment. Using it is seamless:

RUN npm install pm2 -g
CMD [ "pm2-runtime", "npm", "--", "start" ]

Read More about the dedicated integration

Host monitoring speedbar

PM2 allows to monitor your host/server vitals with a monitoring speedbar.

To enable host monitoring:

$ pm2 set pm2:sysmonit true
$ pm2 update

Framework supported

Terminal Based Monitoring

Monit

Monitor all processes launched straight from the command line:

$ pm2 monit

Log Management

To consult logs just type the command:

$ pm2 logs

Standard, Raw, JSON and formated output are available.

Examples:

$ pm2 logs APP-NAME       # Display APP-NAME logs
$ pm2 logs --json         # JSON output
$ pm2 logs --format       # Formated output

$ pm2 flush               # Flush all logs
$ pm2 reloadLogs          # Reload all logs

To enable log rotation install the following module

$ pm2 install pm2-logrotate

More about log management

Startup Scripts Generation

PM2 can generates and configure a Startup Script to keep PM2 and your processes alive at every server restart.

Init Systems Supported: systemd, upstart, launchd, rc.d

# Generate Startup Script
$ pm2 startup

# Freeze your process list across server restart
$ pm2 save

# Remove Startup Script
$ pm2 unstartup

More about Startup Scripts Generation

Updating PM2

# Install latest PM2 version
$ npm install pm2@latest -g
# Save process list, exit old PM2 & restore all processes
$ pm2 update

PM2 updates are seamless

PM2+ Monitoring

If you manage your apps with PM2, PM2+ makes it easy to monitor and manage apps across servers.

https://app.pm2.io/

Feel free to try it:

Discover the monitoring dashboard for PM2

Thanks in advance and we hope that you like PM2!

CHANGELOG

CHANGELOG

Contributors

Contributors

License

PM2 is made available under the terms of the GNU Affero General Public License 3.0 (AGPL 3.0). For other licenses contact us.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].