Running and stopping a Forever daemon
suggest changeTo start the process:
$ forever start index.js
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info: Forever processing file: index.js
List running Forever instances:
$ forever list
info: Forever processes running
|data: | index | uid | command | script |forever pid|id | logfile |uptime |
|------|-------|-----|------------------|-------------|-----------|-----|------------------------|--------------|
|data: | [0] |f4Kt |/usr/bin/nodejs | src/index.js|2131 | 2146|/root/.forever/f4Kt.log | 0:0:0:11.485 |
Stop the first process:
$ forever stop 0
$ forever stop 2146
$ forever stop --uid f4Kt
0 is the index from forever list. 2146 is the pid in the id column of that listing. --uid matches the uid column. --pidFile is a path you pass when starting Forever so it writes a pid file. It is not a pid, and it does not select the process to stop.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents