Robert Mennell Robert Mennell - 1 year ago 111
Linux Question

PM2(node) Sending a message to a cluster from the commandline

So I have a process managed with

that's made in
which is pretty typical. However looking through documentation it looks like it's possible to send messages to process launched in cluster mode.

The problem is that the documentation is programmatic, with no hints on how to call that from the command line other than passing a
to the application. If I could pass a message with
that'd also solve my problem, but just passing a message to the cluster is useful enough if I could find that.

So is there a way to pass a message to a cluster of processes managed by
so I can handle it with the
process.on('message', ()=>{})

Answer Source

This feature will be available on PM2 2.1.6!

Official documentation:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download