Netrunner and PM2
Using PM2 for production management

PM2 allows you to run services in the background, monitor server resource usage, write logs, and more.
To run & work with a testnet you can use these simple commands:
1. Start a testnet in a single command:
pm2 start runner2.js
2. Check the active background services
You will see the following

3. Enter monitoring dashboard
pm2 monit runner2

4. Read the logs stream
pm2 logs runner2

5. Read last N lines of logs from stdout / stderr streams (nostream
mode)
nostream
mode)pm2 logs --lines <N> --nostream runner2
Reading logs available even if the service was stopped - so it's useful to understand reasons of downtimes and so on
6. Stop a testnet
pm2 stop runner2
Last updated
Was this helpful?