2016-02-03 23:01:32 +08:00
|
|
|
## The contents of this file are subject to the Mozilla Public License
|
|
|
|
|
## Version 1.1 (the "License"); you may not use this file except in
|
|
|
|
|
## compliance with the License. You may obtain a copy of the License
|
|
|
|
|
## at http://www.mozilla.org/MPL/
|
|
|
|
|
##
|
|
|
|
|
## Software distributed under the License is distributed on an "AS IS"
|
|
|
|
|
## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
|
|
|
|
## the License for the specific language governing rights and
|
|
|
|
|
## limitations under the License.
|
|
|
|
|
##
|
|
|
|
|
## The Original Code is RabbitMQ.
|
|
|
|
|
##
|
|
|
|
|
## The Initial Developer of the Original Code is GoPivotal, Inc.
|
|
|
|
|
## Copyright (c) 2007-2016 Pivotal Software, Inc. All rights reserved.
|
|
|
|
|
|
|
|
|
|
|
2016-02-03 02:54:36 +08:00
|
|
|
defmodule StatusCommand do
|
|
|
|
|
import Helpers
|
|
|
|
|
|
2016-03-08 06:45:50 +08:00
|
|
|
def status([_head|_], _), do: HelpCommand.help
|
2016-03-09 01:05:25 +08:00
|
|
|
def status([], %{node: node_name}) do
|
|
|
|
|
node_name
|
2016-03-08 06:45:50 +08:00
|
|
|
|> Helpers.parse_node
|
2016-03-07 23:32:34 +08:00
|
|
|
|> :rabbit_misc.rpc_call(:rabbit, :status, [])
|
2016-02-03 02:54:36 +08:00
|
|
|
end
|
2016-03-05 05:35:54 +08:00
|
|
|
|
|
|
|
|
def usage do
|
|
|
|
|
"status"
|
|
|
|
|
end
|
2016-02-03 02:54:36 +08:00
|
|
|
end
|