Stuff Goes Bad:Erlang In Anger


Trying to get a global view of processes is helpful when trying to assess how much work is being done in the VM in terms of tasks. A general good practice in Erlang is to use processes for truly concurrent activities — on web servers, you will usually get one process per request or connection, and on stateful systems, you may add one process per-user — and therefore the number of processes on a node can be used as a metric for load.
 Most tools mentioned in section 5.1 will track them in one way or another, but if the process count needs to be done manually, calling the following expression is enough:


1> length(processes()).
 Tracking this value over time can be extremely helpful to try and characterize load or detect process leaks, along with other metrics you may have around.