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 | |
parent | 66b7eaae86e6444eb7561ced62ae941298190998 (diff) | |
download | rabbitmq-server-df68fb98eb95fbc44eaffe4848ecc71810cca82d.tar.gz |
Remove rabbitmqctl disk free features
-rw-r--r-- | docs/rabbitmqctl.1.xml | 33 | ||||
-rw-r--r-- | src/rabbit_control.erl | 22 |
2 files changed, 5 insertions, 50 deletions
diff --git a/docs/rabbitmqctl.1.xml b/docs/rabbitmqctl.1.xml index c1bd075b..99ca3659 100644 --- a/docs/rabbitmqctl.1.xml +++ b/docs/rabbitmqctl.1.xml @@ -1439,39 +1439,6 @@ </listitem> </varlistentry> - <varlistentry> - <term><cmdsynopsis><command>set_disk_free_limit</command> <arg choice="req"><replaceable>bytes</replaceable></arg></cmdsynopsis></term> - <listitem> - <variablelist> - <varlistentry> - <term>bytes</term> - <listitem><para> - The new disk free limit at which flow - control is triggered, for the drive or partition - that the broker data store resides on. - </para></listitem> - </varlistentry> - </variablelist> - </listitem> - </varlistentry> - - <varlistentry> - <term><cmdsynopsis><command>set_disk_free_limit_mem_relative</command> <arg choice="req"><replaceable>multiple</replaceable></arg></cmdsynopsis></term> - <listitem> - <variablelist> - <varlistentry> - <term>multiple</term> - <listitem><para> - The new disk free limit at which flow - control is triggered, expressed relative to total RAM. - The argument may be a floating point number - and the limit will be calculated as the argument - times the total installed RAM. - </para></listitem> - </varlistentry> - </variablelist> - </listitem> - </varlistentry> </variablelist> </refsect2> 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). |