Skip to content

Instantly share code, notes, and snippets.

@habibutsu
Created November 13, 2015 18:15
Show Gist options
  • Save habibutsu/43902fa1ada97417aded to your computer and use it in GitHub Desktop.
Save habibutsu/43902fa1ada97417aded to your computer and use it in GitHub Desktop.
Inspect RabbitMQ
% For running can be used 'rabbitmqctl'
% Example:
% sudo rabbitmqctl eval 'node().'
% Find process with the largest memory consumption
lists:sublist(
lists:reverse(
lists:sort([{process_info(Pid, memory), Pid, process_info(Pid)} || Pid <- processes()])), 1).
% get all vhosts
rabbit_vhost:list()
% view all queues
lists:map(
fun(Vhost) ->
Queues = rabbit_amqqueue:info_all(Vhost)
end, VHosts = rabbit_vhost:list()).
% getting process info
process_info(rabbit_misc:string_to_pid("<[email protected]>")).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment