I tend to do two things in this area (note relx):<div><br></div><div>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).</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div><br></div><div>[0] In a newly deployed system, I would probably check out exometer.<br><br><div class="gmail_quote">On Sun Dec 28 2014 at 12:16:26 PM Roberto Ostinelli <<a href="mailto:roberto@widetag.com">roberto@widetag.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div>Let's say that you have a running node, started from a release command:<br></div><div>$ myapp start</div><div><br></div><div>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:<br></div><div><br></div><div>$ myappctl memory</div><div>total:14303080</div><div><br></div><div>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?<br></div><div><br></div><div>There are many ways, I'd like to hear some recommendations.</div><div><br></div><div>Best,</div><div>r.</div>







</div>
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
</blockquote></div></div>