diff options
| author | Emile Joubert <emile@rabbitmq.com> | 2011-05-31 12:03:33 +0100 |
|---|---|---|
| committer | Emile Joubert <emile@rabbitmq.com> | 2011-05-31 12:03:33 +0100 |
| commit | 7f4bd7efc40349e99cd3f3f0906dd3d9f921b07e (patch) | |
| tree | 6b28d9b27848ff33ca076e33d15916e0c8e6c7c0 /src | |
| parent | 47b8aea5379850f96848c1f94b64f1410816a2ad (diff) | |
| download | rabbitmq-server-git-7f4bd7efc40349e99cd3f3f0906dd3d9f921b07e.tar.gz | |
rabbitmqctl report layout tidy
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_control.erl | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl index 53dd117e27..a2a054b46c 100644 --- a/src/rabbit_control.erl +++ b/src/rabbit_control.erl @@ -309,7 +309,7 @@ action(report, Node, _Args, _Opts, Inform) -> io:format("Reporting server status on ~p~n", [erlang:universaltime()]), [action(status, ClusterNode, [], [], Inform) || ClusterNode <- rpc_call(Node, rabbit_mnesia, running_clustered_nodes, [])], - Report = fun ({Descr, Module, InfoFun, KeysFun}, VHostArg) -> + Report = fun ({Descr, Module, InfoFun, KeysFun, VHostArg}) -> io:format("%% ~p~n", [[Descr] ++ VHostArg]), case Results = rpc_call(Node, Module, InfoFun, VHostArg) of [_|_] -> InfoItems = rpc_call(Node, Module, KeysFun, []), @@ -319,22 +319,23 @@ action(report, Node, _Args, _Opts, Inform) -> end end, GlobalQueries = [{"connections", rabbit_networking, connection_info_all, - connection_info_keys}, - {"channels", rabbit_channel, info_all, info_keys}], - VHostQueries = [{"queues", rabbit_amqqueue, info_all, info_keys}, - {"exchanges", rabbit_exchange, info_all, info_keys}, - {"bindings", rabbit_binding, info_all, info_keys}, + connection_info_keys, []}, + {"channels", rabbit_channel, info_all, info_keys, []}], + VHostQueries = [{"queues", rabbit_amqqueue, info_all, info_keys, []}, + {"exchanges", rabbit_exchange, info_all, info_keys, []}, + {"bindings", rabbit_binding, info_all, info_keys, []}, {"consumers", rabbit_amqqueue, consumers_all, - consumer_info_keys}], + consumer_info_keys, []}], VHosts = rpc_call(Node, rabbit_vhost, list, []), - [Report(Q, []) || Q <- GlobalQueries], - [Report(Q, [V]) || V <- VHosts, Q <- VHostQueries], + [Report(Q) || Q <- GlobalQueries], + [Report(setelement(5, Q, [V])) || Q <- VHostQueries, V <- VHosts], [begin io:format("%% ~p~n", [["permissions" | [VHost]]]), display_list(call(Node, {rabbit_auth_backend_internal, list_vhost_permissions, [binary_to_list(VHost)]})) end || VHost <- VHosts], + io:format("End of server status report~n"), ok. %%---------------------------------------------------------------------------- |
