Take a look at the code in observer_backend.erl (${ERLROOT}/lib/runtime_tools/src)<div>This is used by things like etop etc to collect performance data about processes</div><div><div><br></div></div><div>/Joe</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Nov 2, 2012 at 5:39 AM, József Bérces <span dir="ltr"><<a href="mailto:jozsef.berces@ericsson.com" target="_blank">jozsef.berces@ericsson.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div>
<div><font face="Arial"><span>Hi,</span></font></div>
<div><font face="Arial"><span></span></font> </div>
<div><font face="Arial"><span>I am writing an application that runs in the background crunching some data and writing result files to the disk. It has a web interface to configure what data and how to process. And I was thinking
about that it would be good to be able to present some stats on the web interface about which Erlang processes how much CPU resources used during the last second/minute/day/week etc.</span></font></div>
<div><font face="Arial"><span></span></font> </div>
<div><font face="Arial"><span>Is there any way to get this kind of info somehow without wasting too much resources on the stat collection itself? I do not want it for all Erlang processes, only for a well defined subset of
them.</span></font></div>
<div><font face="Arial"><span></span></font> </div>
<div><font face="Arial"><span>eprof/fprof seem to be too heavy: they would take too much system resources and they would produce too detailed data for me.
</span></font></div>
<div><font face="Arial"><span></span></font> </div>
<div><font face="Arial"><span>erlang:system_profile seems to be promising (I have not started playing with it) but it has that note in the doc that it is experimental so I am a bit afraid of it.</span></font></div>
<div><font face="Arial"><span></span></font> </div>
<div><font face="Arial"><span>I was also thinking about tracing my processes with the flag 'running' so I would get 'in' and 'out' message tags in a profiling process. I am not sure how much resources this would take.</span></font></div>
<div><font face="Arial"><span></span></font> </div>
<div><font face="Arial"><span>Any suggestions are welcome!</span></font></div>
<div><font face="Arial"><span></span></font> </div>
<div><font face="Arial"><span>Thanks,</span></font></div>
<div><font face="Arial"><span>Jozsef</span></font></div>
</div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>