[erlang-questions] top(1) in Erlang

Minsloc Tarren minsloc@REDACTED
Mon Sep 17 18:35:44 CEST 2007


just gut pman (try pman:start() if you hadn't seen it in action).

According to http://www.erlang.org/doc/pdf/pman.pdf

"Reds - number of reductions performed. Gives a rough estimate of the
process' work load."

Cheers, Minsloc.

On 9/17/07, David King <dking@REDACTED> wrote:
>
> I'm trying to write a process monitor akin to Unix's top(1) for
> Erlang processes. Is there any way to determine how long a given
> process spent with the CPU over the last X units of time? The
> scheduler has to know this, does it expose that information? Does
> something like this already exist that I'm missing?
>
> erlang:process_info/1 returns the following for a given process:
>
>    [{current_function,{hipe_icode_coordinator,coordinate,4}},
>     {initial_call,{erlang,apply,2}},
>     {status,waiting},
>     {message_queue_len,0},
>     {messages,[]},
>     {links,[]},
>     {dictionary,[]},
>     {trap_exit,false},
>     {error_handler,error_handler},
>     {priority,normal},
>     {group_leader,<0.30.0>},
>     {heap_size,6765},
>     {stack_size,6},
>     {reductions,8193},
>     {garbage_collection,[{fullsweep_after,65535}]}]
>
> Is reductions close to what I want? Will that increment for things
> other than function calls? Does that matter?
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070917/6305c0bf/attachment.htm>


More information about the erlang-questions mailing list