summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2010-02-01 22:58:09 +0000
committerMatthias Radestock <matthias@lshift.net>2010-02-01 22:58:09 +0000
commit209e5914c0329c51efa9463bf5806641344624fc (patch)
tree1d444bec252d899b5fb1c1b575cdda77d0f40b03 /src
parenteafef585eb6c367d99dafcccb605e517e7c60839 (diff)
downloadrabbitmq-server-git-209e5914c0329c51efa9463bf5806641344624fc.tar.gz
add 'rabbitmqctl list_channels' command
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_control.erl13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl
index 2fe3f33e09..738ed444f4 100644
--- a/src/rabbit_control.erl
+++ b/src/rabbit_control.erl
@@ -158,6 +158,7 @@ Available commands:
list_exchanges [-p <VHostPath>] [<ExchangeInfoItem> ...]
list_bindings [-p <VHostPath>]
list_connections [<ConnectionInfoItem> ...]
+ list_channels [<ChannelInfoItem> ...]
Quiet output mode is selected with the \"-q\" flag. Informational
messages are suppressed when quiet mode is in effect.
@@ -191,6 +192,11 @@ frame_max, client_properties, recv_oct, recv_cnt, send_oct, send_cnt,
send_pend]. The default is to display user, peer_address, peer_port
and state.
+<ChannelInfoItem> must be a member of the list [pid, connection, user,
+vhost, transactional, consumer_count, messages_unacknowledged,
+prefetch_count]. The default is to display pid, user, transactional,
+consumer_count, messages_unacknowledged.
+
"),
halt(1).
@@ -301,6 +307,13 @@ action(list_connections, Node, Args, Inform) ->
[ArgAtoms]),
ArgAtoms);
+action(list_channels, Node, Args, Inform) ->
+ Inform("Listing channels", []),
+ ArgAtoms = default_if_empty(Args, [pid, user, transactional, consumer_count,
+ messages_unacknowledged]),
+ display_info_list(rpc_call(Node, rabbit_channel, info_all, [ArgAtoms]),
+ ArgAtoms);
+
action(Command, Node, Args, Inform) ->
{VHost, RemainingArgs} = parse_vhost_flag(Args),
action(Command, Node, VHost, RemainingArgs, Inform).