diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2012-01-11 15:56:30 +0000 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2012-01-11 15:56:30 +0000 |
commit | 1e3050fe1c9d12dfad945859e5c6b31ad9b23bff (patch) | |
tree | 5de520b7479c24c47ee40275a278838383879577 | |
parent | 5ea831d1be22aa7b30d1f4fbbc63c3dde3f70657 (diff) | |
download | rabbitmq-server-1e3050fe1c9d12dfad945859e5c6b31ad9b23bff.tar.gz |
rename fd stats items to make their meaning more obvious
- and arrange them in limit/used order
- and make process count info look the same
-rw-r--r-- | src/file_handle_cache.erl | 10 | ||||
-rw-r--r-- | src/rabbit.erl | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl index 3ef12375..c11fb54b 100644 --- a/src/file_handle_cache.erl +++ b/src/file_handle_cache.erl @@ -261,7 +261,7 @@ -endif. %%---------------------------------------------------------------------------- --define(INFO_KEYS, [count, limit, socket_count, socket_limit]). +-define(INFO_KEYS, [total_limit, total_used, sockets_limit, sockets_used]). %%---------------------------------------------------------------------------- %% Public API @@ -789,10 +789,10 @@ write_buffer(Handle = #handle { hdl = Hdl, offset = Offset, infos(Items, State) -> [{Item, i(Item, State)} || Item <- Items]. -i(count, #fhc_state{open_count = C1, obtain_count = C2}) -> C1 + C2; -i(limit, #fhc_state{limit = Limit}) -> Limit; -i(socket_count, #fhc_state{obtain_count = Count}) -> Count; -i(socket_limit, #fhc_state{obtain_limit = Limit}) -> Limit; +i(total_limit, #fhc_state{limit = Limit}) -> Limit; +i(total_used, #fhc_state{open_count = C1, obtain_count = C2}) -> C1 + C2; +i(sockets_limit, #fhc_state{obtain_limit = Limit}) -> Limit; +i(sockets_used, #fhc_state{obtain_count = Count}) -> Count; i(Item, _) -> throw({bad_argument, Item}). %%---------------------------------------------------------------------------- diff --git a/src/rabbit.erl b/src/rabbit.erl index e8dc503e..7b4a501c 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -320,8 +320,8 @@ status() -> {vm_memory_limit, {vm_memory_monitor, get_memory_limit, []}}]), S3 = [{file_descriptors, file_handle_cache:info()}, - {processes, [{count, erlang:system_info(process_count)}, - {limit, erlang:system_info(process_limit)}]}, + {processes, [{limit, erlang:system_info(process_limit)}, + {used, erlang:system_info(process_count)}]}, {run_queue, erlang:statistics(run_queue)}, {uptime, begin {T,_} = erlang:statistics(wall_clock), |