anchor.diff:       {basic_info, element(2, ns_info:basic_info())},
        {processes, grab_process_infos()},
        {babysitter_processes, (catch grab_babysitter_process_infos())},
  +     {couchdb_processes, (catch grab_couchdb_process_infos())},
        {memory, memsup:get_memory_data()},
        {disk, (catch ns_disksup:get_disk_data())},
        {active_tasks, task_status_all()},
  
positive.code: 
      Reply(processes, grab_process_infos()),
      Reply(babysitter_processes, (catch grab_babysitter_process_infos())),
      Reply(version, ns_info:version()),
      Reply(manifest, manifest()),
      Reply(config, ns_config_log:sanitize(ns_config:get_kv_list())),
  
negative.code: 
      do_handle_per_node_processes(Resp, Node, DiagNoMasterEvents).
  
  get_other_node_processes(Key, PerNodeDiag) ->
      Processes = proplists:get_value(Key, PerNodeDiag, []),
      %% it may be rpc or any other error; just pretend it's the process so that
      %% the error is visible
      case is_list(Processes) of
          true ->
              Processes;
          false ->
              [Processes]
      end.
  
  write_processes(Resp, Node, Key, Processes) ->
      misc:executing_on_new_process(
        fun () ->
                write_chunk_format(Resp, "per_node_~p(~p) =~n", [Key, Node]),
                lists:foreach(
                  fun (Process) ->
                          write_chunk_format(Resp, "     ~p~n", [Process])
                  end, Processes),
                Resp:write_chunk(<<"\n\n">>)
        end).
  
  do_handle_per_node_processes(Resp, Node, PerNodeDiag) ->
      erlang:garbage_collect(),
  
      Processes = proplists:get_value(processes, PerNodeDiag),
  
      BabysitterProcesses = get_other_node_processes(babysitter_processes, PerNodeDiag),
      CouchdbProcesses = get_other_node_processes(couchdb_processes, PerNodeDiag),
  
      DiagNoProcesses = lists:keydelete(
                          processes, 1,
                          lists:keydelete(babysitter_processes, 1,
                                          lists:keydelete(couchdb_processes, 1, PerNodeDiag))),
  
      write_processes(Resp, Node, processes, Processes),
      write_processes(Resp, Node, babysitter_processes, BabysitterProcesses),
      write_processes(Resp, Node, couchdb_processes, CouchdbProcesses),
  
      do_handle_per_node_stats(Resp, Node, DiagNoProcesses).
  
  