where are the processes?

Gunilla Arendt <>
Tue Apr 25 13:50:11 CEST 2006


Yes, the patch is included in R11B.

Regards, Gunilla

Michael McDaniel wrote:
> On Sat, Apr 22, 2006 at 11:07:59AM +0200, Rikard Johansson wrote:
>> Hi,
>>
>> Note that there is a bug in the output from etop_txt, values are  
>> printed on the wrong location, i.e. with wrong label.
>> The bug existed in at least R10B6.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
>   Gosh, duly noted; and patched.  Thank you.  Things are now
>   starting to make more sense to me regarding resource usage.
> 
>   I do hope the patch gets into the next release.
> 
> ~Michael
> 
> 
>> This patch corrects the problem:
>>
>>
>> 57,59c57,59
>> <     io:fwrite(Fd,?SYSFORM,  
>> [Config#opts.node,Clock,Cpu,Tot,NProcs,Procs,
>> <                           RQ,Atom,Bin,Code,Ets]),
>> <     io:nl(Fd),
>> ---
>>>     io:fwrite(Fd,?SYSFORM, [Config#opts.node,Clock,  
>> Cpu,Tot,Bin,NProcs,
>>>                           Procs,Code,RQ,Atom,Ets]),
>>>     io:nl(Fd),
>> SYSFORM as defined in etop_defs.hrl:
>> -define(SYSFORM,
>> 	" ~-72w~10s~n"
>> 	" Load:  cpu  ~8w               Memory:  total    ~8w    binary    
>> ~8w~n"
>> 	"        procs~8w                        processes~8w    code      
>> ~8w~n"
>> 	"        runq ~8w                        atom     ~8w    ets       
>> ~8w~n").
>>
>> I have previously submitted this patch to erlang-patches, but I have  
>> not seen if it has made it way into any of the later releases.
>>
>>
>> /Rikard
>>
>>
>>
>>
>> 22 apr 2006 kl. 06.47 skrev Michael McDaniel:
>>
>>> On Fri, Apr 21, 2006 at 03:58:17PM -0700, Michael McDaniel wrote:
>>>> SHORT:  etop says 'procs  734506' and 'runq  15902' though I can't
>>>>        find the processes
>>>>
>>>> LONG: ...
>>>>
>>>>
>>>> SYSTEM:
>>>>
>>>>  yaws 1.56 compiled and running on R10B-10 on Linux
>>>>
>>>>  Everything is started from yaws except for the process
>>>>  that the 404 error handler sends messages to.
>>>>
>>>>  one appmod sends/receives messages with a persistent process
>>>>
>>>>  another persistent process does some file monitoring
>>>>
>>>>  a special 404 error handler sends a message to another
>>>>  persistent process (started independent of yaws).
>>>>
>>>>
>>>>  I start yaws thusly:
>>>>
>>>>  /bin/su root -c " /usr/local/bin/yaws -sname yaws_autosys -heart  \
>>>>                    -pa /var/yaws/ebin -D -x                        \
>>>>                    -erlarg \"-config /var/yaws/ebin/sys.config\"   \
>>>>                  "
>>>>
>>>>  and contents of sys.config are
>>>>
>>>>  [{mnesia, [{dir, "/var/yaws/Mnesia.yaws_autosys"}]}].
>>>>
>>>>
>>>>
>>>> Everything seems to work fine.  This all runs on a remote machine.
>>>> I login to that machine via ssh and run the following:
>>>>
>>>>
>>>> I have been noticing that, when running etop as
>>>>
>>>> $ erl -sname etop -hidden -s etop -s erlang halt -output text \
>>>>      -lines 27 -interval 33 -node ''
>>>>
>>>> I am seeing an increasing number of processes and also of
>>>> run queue processes, for example,
>>>>
>>>> ===================================================================== 
>>>> ===
>>>>                                                 
>>>> 20:25:01
>>>>
>>>> Load: cpu      0        Memory:  total      756842     
>>>> binary        121
>>>>      procs  734563              processes       0     
>>>> code          543
>>>>       runq   15736              atom         4626     
>>>> ets           342
>>>>
>>>> --------------------------------------------------------------------- 
>>>> ---
>>>>
>>>> When first starting, the procs is less than 1000, runq is zero or  
>>>> single
>>>> digit count, and total memory is less than ten megabytes.  binary,  
>>>> code,
>>>> ets, atom stay about the same.
>>>>
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> correction:
>>>
>>>   should be "When first starting ... runq is under one hundred ..."
>>>
>>> ~M
>>>
>>>
>>>> Now, when I remote shell as follows,
>>>>
>>>> $ erl -sname fu -remsh 
>>>> Erlang (BEAM) emulator version 5.4.13 [hipe]
>>>>
>>>> Eshell V5.4.13  (abort with ^G)
>>>> ()1> erlang:statistics(run_queue).
>>>> 0
>>>> ()2>
>>>> User switch command
>>>> --> q
>>>> $
>>>>
>>>> The zero processes from erlang:statistics/1 has me confused  
>>>> compared to
>>>> what I am seeing using erlang:statistics/1 and what etop is  
>>>> showing me.
>>>>
>>>> I am concerned about all these processes I can't find and the  
>>>> large runq
>>>> shown by etop.
>>>>
>>>> I can do etop:config(lines, 300) there are less than 300 processes  
>>>> listed;
>>>> same for i() from the remote shell.
>>>>
>>>>
>>>>
>>>> QUESTIONS:
>>>>
>>>> 1) what are the two different run queues from erlang:statistics/1
>>>>   and the runq shown by etop?
>>>>
>>>> 2) how can I see (via some text mode tool) what the actual processes
>>>>   and processes in the runq that etop says exist ?
>>>>
>>>>
>>>> thanks,
>>>>
>>>> ~Michael
>>> -- 
>>> Michael McDaniel
>>> Portland, Oregon, USA
>>> http://autosys.us
>>> +1 503 283 5284
>>>
> 




More information about the erlang-questions mailing list