diff options
author | Emile Joubert <emile@rabbitmq.com> | 2012-03-28 10:59:46 +0100 |
---|---|---|
committer | Emile Joubert <emile@rabbitmq.com> | 2012-03-28 10:59:46 +0100 |
commit | df68fb98eb95fbc44eaffe4848ecc71810cca82d (patch) | |
tree | 018b4aaa4a5d90d724f4d56997059b78cf7fdd0e /src/rabbit_control.erl | |
parent | 66b7eaae86e6444eb7561ced62ae941298190998 (diff) | |
download | rabbitmq-server-df68fb98eb95fbc44eaffe4848ecc71810cca82d.tar.gz |
Remove rabbitmqctl disk free features
Diffstat (limited to 'src/rabbit_control.erl')
-rw-r--r-- | src/rabbit_control.erl | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl index 7e341cf2..eb14db60 100644 --- a/src/rabbit_control.erl +++ b/src/rabbit_control.erl @@ -324,20 +324,13 @@ action(trace_off, Node, [], Opts, Inform) -> rpc_call(Node, rabbit_trace, stop, [list_to_binary(VHost)]); action(set_vm_memory_high_watermark, Node, [Arg], _Opts, Inform) -> - Frac = format_float(Arg), - Inform("Setting memory threshold on ~p to ~p", [Node, Frac]), + Frac = list_to_float(case string:chr(Arg, $.) of + 0 -> Arg ++ ".0"; + _ -> Arg + end), + Inform("Setting memory threshhold on ~p to ~p", [Node, Frac]), rpc_call(Node, vm_memory_monitor, set_vm_memory_high_watermark, [Frac]); -action(set_disk_free_limit, Node, [Arg], _Opts, Inform) -> - Bytes = list_to_integer(Arg), - Inform("Setting disk free space limit on ~p to ~p bytes", [Node, Bytes]), - rpc_call(Node, rabbit_disk_monitor, set_disk_free_limit, [Bytes]); - -action(set_disk_free_limit_mem_relative, Node, [Arg], _Opts, Inform) -> - Mult = format_float(Arg), - Inform("Setting disk free space limit on ~p to ~p times total RAM", - [Node, Mult]), - rpc_call(Node, rabbit_disk_monitor, set_disk_free_limit, [{mem_relative, Mult}]); action(set_permissions, Node, [Username, CPerm, WPerm, RPerm], Opts, Inform) -> VHost = proplists:get_value(?VHOST_OPT, Opts), @@ -559,8 +552,3 @@ prettify_typed_amqp_value(array, Value) -> [prettify_typed_amqp_value(T, V) || {T, V} <- Value]; prettify_typed_amqp_value(_Type, Value) -> Value. -format_float(Arg) -> - list_to_float(case string:chr(Arg, $.) of - 0 -> Arg ++ ".0"; - _ -> Arg - end). |