minimal-process-manager
v1.1.4
Published
A minimalist process manager
Maintainers
Readme
Minimalist Resources Manager for Node
Description
A simple and lightweight process manager for Node.js applications. Start, manage, and monitor Node.js processes with cluster mode for multiple CPU cores and optional memory usage logging.
Installation
npm install -g minimal-process-managerUsage
Start a script (default: up to 5 restarts on crash):
minimal-process-manager start script.jsRun in cluster mode (one worker per CPU):
minimal-process-manager start example.js --clusterRun with unlimited restarts on crash:
minimal-process-manager start example.js --unlimitedOptions
| Option | Description |
| ------------ | ------------------------------ |
| --cluster | Run one process per CPU core |
| --unlimited| Restart on crash indefinitely |
Behavior
- Graceful shutdown: SIGINT (Ctrl+C) and SIGTERM stop the managed process and exit cleanly.
- Memory logging: The manager prints RSS, heap usage, and external memory every second. For high-heap GC hints, run Node with
--expose-gc(e.g.node --expose-gc node_modules/.bin/minimal-process-manager start app.js).
