iilyak opened a new pull request #761: Add a debugging utilities for listing 
processes
URL: https://github.com/apache/couchdb/pull/761
 
 
   ## Overview
   
   This adds few useful debug tools.
   
   1. List a cluster of linked processes. This function receives the
   initial Pid to start from. The function doesn't recurse to pids
   older than initial one.
   ```
   167> couch_debug:print_linked_processes(whereis(couch_index_server)).
   name                                         | reductions | 
message_queue_len |  memory
   couch_index_server[<0.288.0>]                |   478240   |         0        
 |  109696
     couch_index:init/1[<0.3520.22>]            |    4899    |         0        
 |  109456
       couch_file:init/1[<0.886.22>]            |   11973    |         0        
 |  67984
         couch_index:init/1[<0.3520.22>]        |    4899    |         0        
 |  109456
       couch_index_updater:init/1[<0.3550.22>]  |   19671    |         0        
 |  26408
         couch_index:init/1[<0.3520.22>]        |    4899    |         0        
 |  109456
       couch_index_compactor:init/1[<0.885.22>] |     25     |         0        
 |   2704
         couch_index:init/1[<0.3520.22>]        |    4899    |         0        
 |  109456
       couch_index_server[<0.288.0>]            |   478240   |         0        
 |  109696
   ```
   2. List couch_index_server children
   ```
   169> couch_debug:ps(couch_index_server).
   name                                              | reductions | 
message_queue_len |    memory    |id
   couch_index_server[<0.288.0>]                     |   503398   |         0   
      |    109696    |
     couch_index:init/1[<0.10447.22>]                |    4700    |         0   
      |    109456    |
       couch_file:init/1[<0.10462.22>]               |    8514    |         0   
      |    67984     
|46:#Port<0.134945>:/.shards/00000000-1fffffff/thedb-010b3e313347496ab96a4d762aae4e87.1503092951_design/mrview/8f3db710871cdc942f4793936e3de269.view
         couch_index:init/1[<0.10447.22>]            |    4700    |         0   
      |    109456    |
       couch_index_updater:init/1[<0.10489.22>]      |   12575    |         0   
      |    34312     |
         couch_index:init/1[<0.10447.22>]            |    4700    |         0   
      |    109456    |
       couch_index_compactor:init/1[<0.10476.22>]    |     25     |         0   
      |     2704     |
         couch_index:init/1[<0.10447.22>]            |    4700    |         0   
      |    109456    |
       couch_index_server[<0.288.0>]                 |   503398   |         0   
      |    109696    |
     couch_index:init/1[<0.10630.22>]                |    4750    |         0   
      |    109456    |
       couch_file:init/1[<0.10642.22>]               |    9381    |         0   
      |    67984     
|44:#Port<0.134965>:/.shards/a0000000-bfffffff/thedb-010b3e313347496ab96a4d762aae4e87.1503092951_design/mrview/8f3db710871cdc942f4793936e3de269.view
   ```
   
   ## Testing recommendations
   
   - couch_debug:ps(couch_index_server). 
   - couch_debug:print_linked_processes(whereis(couch_index_server)).
   
   ## Checklist
   
   - [x] Code is written and works correctly;
   - [ ] Changes are covered by tests;
   - [ ] Documentation reflects the changes;
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to