首页 > 代码库 > [Erlang危机](5.1.3)进程
[Erlang危机](5.1.3)进程
原创文章,转载请注明出处:服务器非业余研究http://blog.csdn.net/erlib 作者Sunface联系邮箱:cto@188.com
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.?全程追踪这个指标对诊断系统负载及检测进程泄漏都是非常有用的,当然也可以结合其它指标来一起诊断。
[Erlang危机](5.1.3)进程
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。