diff options
| author | Matthias Radestock <matthias@lshift.net> | 2008-09-11 18:00:29 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2008-09-11 18:00:29 +0100 |
| commit | 54032ca82e19b0c27b5f4257fb5cfd3b44636510 (patch) | |
| tree | e65165931a7cfad42de3f4cb259311ddf736fb4a /src | |
| parent | 131d39c9cb519a4fb90cca04bdc71721a47a4679 (diff) | |
| parent | a129a035ab0161c5c06243b20889388a58e6f55f (diff) | |
| download | rabbitmq-server-git-54032ca82e19b0c27b5f4257fb5cfd3b44636510.tar.gz | |
merge bug19164 into default
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_multi.erl | 13 |
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}) -> |
