strong-supervisor
Version:
supervisor and monitor for node.js applications
66 lines (55 loc) • 2.75 kB
Plain Text
usage: %MAIN% [options] [app [app-options...]]
Run an app, allowing it to be profiled (using StrongOps) and supervised.
`app` can be a node file to run or a package directory. The default value is
".", the current working directory. Packages will be run by requiring the first
that is found of:
1. javascript file mentioned in `scripts.start` of package.json
*** NOTE: the script is not run and arguments are not preserved, only the
path of the script is used, eg:
`node --nodearg script.js --scriptarg` => 'script.js'
`node bin/www` => `bin/www`
The parser is simple, so options that accept arguments `--flag value`
will cause problems.
2. server.js
3. app.js
4. result of require(app)
1. `main` property of app package.json
2. `app`.js
3. `app`/index.js
Options:
-h,--help Print this message and exit.
-v,--version Print runner version and exit.
-l,--log FILE Write supervisor and worker output to FILE
(defaults to "-", meaning log to stdout).
--no-timestamp-workers
Disable timestamping of worker log lines by supervisor.
--no-timestamp-supervisor
Disable timestamping of supervisor log messages.
--no-log-decoration
Disable decorating supervisor/worker log messages with
cluster id/pid
--syslog Send supervisor and collected worker logs to syslog,
unsupported on Windows.
--metrics BACKEND Report metrics to custom backend. Implies `--profile`.
-p,--pid FILE Write supervisor's pid to FILE, failing if FILE already
has a valid pid in it (default is no pid file).
--cluster N Set the cluster size (default is 'cpu', but see below).
--profile Inject node instrumentation, the default.
--no-profile Do not inject node instrumentation.
-C,--control CTL Listen for control messages on CTL (default `runctl`).
--no-control Do not listen for control messages.
Log FILE is a path relative to the app's working directory if it is not
absolute. To create a log file per process, FILE supports simple substitutions
of %p for process ID and %w for worker ID.
Supported metrics backends are:
- `statsd://[<host>][:<port>]`
- `graphite://[<host>][:<port>]`
- `syslog:[?[application=<application>][&priority=<priority>]` (syslog is the
Unix logging framework, it doesn't exist on Windows)
- `splunk://[<host>]:<port>`
- `log:[<file>]`
- `debug:[?pretty[=<true|false>]]`
It is possible to use multiple backends simultaneously.
Cluster size N is one of:
- A number of workers to run
- A string containing "cpu" to run a worker per CPU