浏览 2086 次
锁定老帖子 主题:获取Erlang系统信息的代码片段
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2010-04-06
SchedId = erlang:system_info(scheduler_id), SchedNum = erlang:system_info(schedulers), ProcCount = erlang:system_info(process_count), ProcLimit = erlang:system_info(process_limit), ProcMemUsed = erlang:memory(processes_used), ProcMemAlloc = erlang:memory(processes), MemTot = erlang:memory(total), error_msg("abormal termination: " "~n Scheduler id: ~p" "~n Num scheduler: ~p" "~n Process count: ~p" "~n Process limit: ~p" "~n Memory used by erlang processes: ~p" "~n Memory allocated by erlang processes: ~p" "~n The total amount of memory allocated: ~p" "~n~p", [SchedId, SchedNum, ProcCount, ProcLimit, ProcMemUsed, ProcMemAlloc, MemTot, Reason]), ok. 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |