summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_multi.erl13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/rabbit_multi.erl b/src/rabbit_multi.erl
index 2b11771770..c6a7e9200d 100644
--- a/src/rabbit_multi.erl
+++ b/src/rabbit_multi.erl
@@ -70,6 +70,7 @@ usage() ->
Available commands:
start_all <NodeCount> - start a local cluster of RabbitMQ nodes.
+ status - print status of all running nodes
stop_all - stops all local RabbitMQ nodes.
rotate_logs [Suffix] - rotate logs for all local and running RabbitMQ nodes.
"),
@@ -88,6 +89,18 @@ action(start_all, [NodeCount], RpcTimeout) ->
false -> timeout
end;
+action(status, [], RpcTimeout) ->
+ io:format("Status of all running nodes...~n", []),
+ call_all_nodes(
+ fun({Node, Pid}) ->
+ Status = rpc:call(Node, rabbit, status, [], RpcTimeout),
+ io:format("Node '~p' with Pid ~p: ~p~n",
+ [Node, Pid, case parse_status(Status) of
+ false -> not_running;
+ true -> running
+ end])
+ end);
+
action(stop_all, [], RpcTimeout) ->
io:format("Stopping all nodes...~n", []),
call_all_nodes(fun({Node, Pid}) ->