[Erlang危机](5.1.3)进程
原创文章,转载请注明出处:服务器非业余研究http://blog.csdn.net/erlib 作者Sunface联系邮箱:[email protected]
Processes
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:
?章节5.1中提到的大部分工具都能以各种的方式来追踪它们,但如果手动获取系统进程数目,你只需要使用下面这个函数就足够了:--------------------------------------------
1> length(processes()).
56535
-------------------------------------------
?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.?全程追踪这个指标对诊断系统负载及检测进程泄漏都是非常有用的,当然也可以结合其它指标来一起诊断。
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。