Well, I just adopt the 'ping' command and implement what I miss if the system needs to be prodded from the outside. A good example is to poke the system via cron at regular intervals. So I just rewrite the script appropriately. I think relx nodetool is different, but you will have to dig that up yourself.<br><div><br></div><div>I think 'erl_call' may be an alternative path you can pursue if you want. The damning way of providing an HTTP POSTable endpoint seems so futile compared to an internal call IMO, but is is also possible. Or open an ssh connection to the shell via the ssh application.</div><div><br></div><br><div class="gmail_quote">On Sun Dec 28 2014 at 12:48:42 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">Thank you Jesper!<div>Yes indeed, the erlang:memory() call is just an example (I use folsom too for real production system monitoring).</div><div><br></div><div>I use rebar for releases, and the ping command just dumps a "pong" response. I'm assuming you refer to the RPC command instead, or maybe the nodetool generated by relx is different?</div><div><br></div><div>Best,</div><div>r.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 28, 2014 at 12:28 PM, Jesper Louis Andersen <span dir="ltr"><<a href="mailto:jesper.louis.andersen@gmail.com" target="_blank">jesper.louis.andersen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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"><div><div>On Sun Dec 28 2014 at 12:16:26 PM Roberto Ostinelli <<a href="mailto:roberto@widetag.com" target="_blank">roberto@widetag.com</a>> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><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></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>
</blockquote></div><br></div>
</blockquote></div>