[erlang-questions] Command-line for releases

Jesper Louis Andersen <>
Sun Dec 28 12:28:39 CET 2014

I tend to do two things in this area (note relx):

Alter the 'myapp' script such that it takes extra commands and execute this
command like "ping" is implemented: call nodetool to do rpc towards the
node (IIRC it creates a distributed node, connects it to the running node
and runs its stuff).

But for stats in general, my approach is very different. I use "folsom" to
gather statistics[0]. Note that this is gathering, not persisting/storing.
Then another application shovels the gathered statistics to a foreign
system for historical data and you plot the data. Knowing that your system
used 320 megabytes of space now is of little use unless you happen to know
what the typical baseline of your system tend to be. So I gather that
information for any production system if I can.

I'm pretty aggressive in stats gathering. It is not uncommon to have 1000+
probes in a system for me. This is because I firmly believe that you need
to measure in order to improve a system.

[0] In a newly deployed system, I would probably check out exometer.

On Sun Dec 28 2014 at 12:16:26 PM Roberto Ostinelli <>

> Hi all,
> Let's say that you have a running node, started from a release command:
> $ myapp start
> Now, I'd like to check some current stats of the node (for instance, with
> erlang:memory/0), but would like to do it with an external script, i.e. a
> command-line tool so that it gets printed in the console, like so:
> $ myappctl memory
> total:14303080
> What is your recommended way to have a command-line tool connect to a
> release-started erlang node to issue a command and return a value?
> There are many ways, I'd like to hear some recommendations.
> Best,
> r.
>  _______________________________________________
> erlang-questions mailing list
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20141228/ac6e54e0/attachment.html>

More information about the erlang-questions mailing list