Skip to content

Instantly share code, notes, and snippets.

@vmx
Created July 1, 2014 02:13
Show Gist options
  • Save vmx/669587813844e5b23325 to your computer and use it in GitHub Desktop.
Save vmx/669587813844e5b23325 to your computer and use it in GitHub Desktop.
Monitoring memory usage within Couchbase
curl -X POST -d 'Json = lists:map(fun(P) -> Info = process_info(P, [current_function, total_heap_size, memory, message_queue_len, reductions, stack_size, status]), Info2 = lists:map(fun(I) -> case I of {current_function, {Mod, Name, Arit}=CF} -> {current_function, list_to_binary(io_lib:format("~p:~p/~p", tuple_to_list(CF)))}; _ -> I end end, Info), {struct, Info2} end, erlang:processes()), {json, Json}' http://localhost:9000/diag/eval
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment