主页

索引

模块索引

搜索页面

4.3.4. Erlang调优

etop <etop>

  1. 找出 cpu 占用最高的进程,图形界面输出,每 10 秒更新一次:

    > spawn(fun() -> etop:start([{interval,10}, {sort, runtime}]) end).
    > etop:stop().
    
  2. 找出内存占用较高进程,输出进程的数量为 20。文本形式输出:

    > spawn(fun() -> etop:start([{output, text}, {lines, 20},  {sort, memory}]) end).
    > etop:stop().
    
[erlang:garbage_collect(P) || P <- erlang:processes(),{status, waiting} == erlang:process_info(P, status)].

+zerts_de_busy_limit

主页

索引

模块索引

搜索页面