diff options
| author | Emile Joubert <emile@rabbitmq.com> | 2011-06-02 18:12:17 +0100 |
|---|---|---|
| committer | Emile Joubert <emile@rabbitmq.com> | 2011-06-02 18:12:17 +0100 |
| commit | 661c972ae8ecad260471aa61a1fb1e5cb5dba0c1 (patch) | |
| tree | 72ebf70c3bc0e9def3c34e3bacf01c15ce476330 /src/rabbit.erl | |
| parent | 75f46f88d89af44012ab16f8f77badbe7f226733 (diff) | |
| download | rabbitmq-server-git-661c972ae8ecad260471aa61a1fb1e5cb5dba0c1.tar.gz | |
Split rabbitmqctl status query
Diffstat (limited to 'src/rabbit.erl')
| -rw-r--r-- | src/rabbit.erl | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index 88b1647473..9a3de988a2 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -18,7 +18,7 @@ -behaviour(application). --export([prepare/0, start/0, stop/0, stop_and_halt/0, status/0, +-export([prepare/0, start/0, stop/0, stop_and_halt/0, status/0, environment/0, rotate_logs/1]). -export([start/2, stop/1]). @@ -180,12 +180,10 @@ -spec(status/0 :: () -> [{pid, integer()} | {running_applications, [{atom(), string(), string()}]} | - {os , {atom(), atom()}} | - {erlang_version , string()} | - {memory , any()} | - {env , [{atom() | term()}]} | - {nodes, [{rabbit_mnesia:node_type(), [node()]}]} | - {running_nodes, [node()]}]). + {os, {atom(), atom()}} | + {erlang_version, string()} | + {memory, any()}]). +-spec(environment/0 :: () -> [{atom() | term()}]). -spec(log_location/1 :: ('sasl' | 'kernel') -> log_location()). -spec(maybe_insert_default_data/0 :: () -> 'ok'). @@ -225,11 +223,12 @@ status() -> {running_applications, application:which_applications()}, {os, os:type()}, {erlang_version, erlang:system_info(system_version)}, - {memory, erlang:memory()}, - {env, lists:filter(fun ({default_pass, _}) -> false; - (_) -> true - end, application:get_all_env(rabbit))}] ++ - rabbit_mnesia:status(). + {memory, erlang:memory()}]. + +environment() -> + lists:filter(fun ({default_pass, _}) -> false; + (_) -> true + end, application:get_all_env(rabbit)). rotate_logs(BinarySuffix) -> Suffix = binary_to_list(BinarySuffix), |
