summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmile Joubert <emile@lshift.net>2010-03-19 16:44:42 +0000
committerEmile Joubert <emile@lshift.net>2010-03-19 16:44:42 +0000
commit82e36802cea188f815602522e0c3863a988ce0ba (patch)
treedbfc607cfa0ad359a2d688997accbbe05737d93e /src
parent928aa9c03865357b82539bdcb1cd22f5f4ca3dc8 (diff)
parentdba50911fce247d98e1e732cf780be692561e318 (diff)
downloadrabbitmq-server-git-82e36802cea188f815602522e0c3863a988ce0ba.tar.gz
Merge bug22407 into default
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_control.erl84
-rw-r--r--src/rabbit_multi.erl13
2 files changed, 4 insertions, 93 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl
index 6aac442888..6f564b1d28 100644
--- a/src/rabbit_control.erl
+++ b/src/rabbit_control.erl
@@ -129,88 +129,8 @@ parse_args([], _) ->
stop() ->
ok.
-usage() ->
- io:format("Usage: rabbitmqctl [-q] [-n <node>] <command> [<arg> ...]
-
-Available commands:
-
- stop - stops the RabbitMQ application and halts the node
- stop_app - stops the RabbitMQ application, leaving the node running
- start_app - starts the RabbitMQ application on an already-running node
- reset - resets node to default configuration, deleting all data
- force_reset
- cluster <ClusterNode> ...
- status
- rotate_logs [Suffix]
- close_connection <ConnectionPid> <ExplanationString>
-
- add_user <UserName> <Password>
- delete_user <UserName>
- change_password <UserName> <NewPassword>
- list_users
-
- add_vhost <VHostPath>
- delete_vhost <VHostPath>
- list_vhosts
-
- set_permissions [-p <VHostPath>] <UserName> <Regexp> <Regexp> <Regexp>
- clear_permissions [-p <VHostPath>] <UserName>
- list_permissions [-p <VHostPath>]
- list_user_permissions <UserName>
-
- list_queues [-p <VHostPath>] [<QueueInfoItem> ...]
- list_exchanges [-p <VHostPath>] [<ExchangeInfoItem> ...]
- list_bindings [-p <VHostPath>]
- list_connections [<ConnectionInfoItem> ...]
- list_channels [<ChannelInfoItem> ...]
- list_consumers [-p <VHostPath>]
-
-Quiet output mode is selected with the \"-q\" flag. Informational
-messages are suppressed when quiet mode is in effect.
-
-<node> should be the name of the master node of the RabbitMQ
-cluster. It defaults to the node named \"rabbit\" on the local
-host. On a host named \"server.example.com\", the master node will
-usually be rabbit@server (unless RABBITMQ_NODENAME has been set to
-some non-default value at broker startup time). The output of hostname
--s is usually the correct suffix to use after the \"@\" sign.
-
-The list_queues, list_exchanges and list_bindings commands accept an
-optional virtual host parameter for which to display results. The
-default value is \"/\".
-
-<QueueInfoItem> must be a member of the list [name, durable,
-auto_delete, arguments, pid, owner_pid, exclusive_consumer_pid,
-exclusive_consumer_tag, messages_ready, messages_unacknowledged,
-messages_uncommitted, messages, acks_uncommitted, consumers,
-transactions, memory]. The default is to display name and (number of)
-messages.
-
-<ExchangeInfoItem> must be a member of the list [name, type, durable,
-auto_delete, arguments]. The default is to display name and type.
-
-The output format for \"list_bindings\" is a list of rows containing
-exchange name, queue name, routing key and arguments, in that order.
-
-<ConnectionInfoItem> must be a member of the list [pid, address, port,
-peer_address, peer_port, state, channels, user, vhost, timeout,
-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,
-number, user, vhost, transactional, consumer_count,
-messages_unacknowledged, acks_uncommitted, prefetch_count]. The
-default is to display pid, user, transactional, consumer_count,
-messages_unacknowledged.
-
-The output format for \"list_consumers\" is a list of rows containing,
-in order, the queue name, channel process id, consumer tag, and a
-boolean indicating whether acknowledgements are expected from the
-consumer.
-
-"),
- halt(1).
+usage() ->
+ rabbitmqctl_usage:usage().
action(stop, Node, [], Inform) ->
Inform("Stopping and halting node ~p", [Node]),
diff --git a/src/rabbit_multi.erl b/src/rabbit_multi.erl
index 7c56ae3dda..bc04357b8c 100644
--- a/src/rabbit_multi.erl
+++ b/src/rabbit_multi.erl
@@ -85,17 +85,8 @@ parse_args([Command | Args]) ->
stop() ->
ok.
-usage() ->
- io:format("Usage: rabbitmq-multi <command>
-
-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.
-"),
- halt(3).
+usage() ->
+ rabbitmqmulti_usage:usage().
action(start_all, [NodeCount], RpcTimeout) ->
io:format("Starting all nodes...~n", []),