Getting started with PM2

Runtime

LaBRI, INRIA Bordeaux - Sud-Ouest

High Performance Runtime Systems for Parallel Architectures

6. Additional PM2 material

6.1 Synopsis of PM2 scripts

6.1.1 pm2-conf

ravel% pm2-conf -h
Usage: pm2-conf { option } { item }
  option:
    -f <name> : Use flavor "name" (default=$PM2_FLAVOR or default)
    -p <name> : Store parameters in file "name" under the preference directory
    -h        : Display this help message
  item:
    <host>            : Add machine "host" to the configuration
    -l <file>         : Use <file> as an input for host names
    -e <host> <i>-<j> : Expand to <hosti> <hosti+1> ... <hostj>
    -s <suffix> item  : Add <suffix> to the "item" expression

A typical use of the extended options could thus be:

ravel% pm2-conf -s tcp cluster0 -s tcp -e cluster 10-12
The current PM2 configuration contains 4 host(s) :
0 : cluster0tcp
1 : cluster10tcp
2 : cluster11tcp
3 : cluster12tcp

6.1.2 pm2-load

ravel% pm2-load -h
Usage: pm2-load { option } command

  option:
    -f name : Use flavor named "name" (default=$PM2_FLAVOR or default)
    -d      : Run command in debug mode (not supported by all implementations)
    -t      : Run command through strace
    -s      : Run scripts in debug mode
    -c name : Use console named "name"
    -l      : Also generate a log file on first node
    -L      : As '-l' but do not display the log file
    -u      : Use local flavor (re-run pm2-config on each node)
    -h      : Display this help message

6.2 Frequently asked questions

Table 6.1 sums up the symptoms together with possible solutions.

SymptomsSolutions
Permission denied error at load time Each configuration node must be made accessible by ssh from the local host. Check you can issue a ssh call to the nodes.
Table 6.1. Common Pitfalls

RETURN HOME | BACK: Mastering PM2 | NEXT: Reading on PM2

Copyright © May 2009 Team Runtime