获取Erlang系统信息的代码片段
2012-05-14 00:57 rhinovirus 阅读(625) 评论(0) 编辑 收藏 举报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), io:format("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", [SchedId, SchedNum, ProcCount, ProcLimit, ProcMemUsed, ProcMemAlloc, MemTot]), ok.
转载自Erlang非业余研究 地址:http://blog.yufeng.info/archives/452
本文基于署名-非商业性使用 3.0许可协议发布,欢迎转载,演绎,但是必须保留本文的署名rhinovirus(包含链接http://www.cnblogs.com/rhinovirus/),且不得用于商业目的。如您有任何疑问或者授权方面的协商,请与我联系。