Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Use recon library to get process memory stats on Windows #224

Closed
lukebakken opened this issue Oct 3, 2017 · 0 comments
Closed

Use recon library to get process memory stats on Windows #224

lukebakken opened this issue Oct 3, 2017 · 0 comments

Comments

@lukebakken
Copy link
Contributor

lukebakken commented Oct 3, 2017

#151483108

rabbitmq/rabbitmq-server#1270 introduced using wmic.exe to get the amount of memory used by erl.exe on Windows. #222 reverted this change and restored behavior to using erlang:memory().

This mailing list post provides a method to get memory use from the Erlang VM's allocator statistics. After some searching, it appears that this method in the recon library achieves the same result.

You can see here some comparison in memory reporting using several different methods. Note that the first value is from recon and the last two are from the code provided in the rabbitmq-users post. Those values also closely track what Task Manager showed in its output.

On Linux, the /proc/PID/statm file will be used, and ps for other Unix platforms.

@lukebakken lukebakken changed the title Use recon library to get process memory stats on Windows Use recon library to get process memory stats on all platforms Oct 4, 2017
@lukebakken lukebakken reopened this Oct 6, 2017
@lukebakken lukebakken added this to the 3.6.13 milestone Oct 8, 2017
@lukebakken lukebakken changed the title Use recon library to get process memory stats on all platforms Use recon library to get process memory stats on Windows Oct 10, 2017
michaelklishin added a commit to rabbitmq/rabbitmq-server that referenced this issue Oct 11, 2017
michaelklishin added a commit to rabbitmq/rabbitmq-server that referenced this issue Oct 12, 2017
Update default node memory calculation strategy to match rabbitmq/rabbitmq-common#224
lukebakken added a commit that referenced this issue Oct 12, 2017
Follow-up to #224

* R16 compatibility
* Trap noproc in an additional case
michaelklishin added a commit that referenced this issue Oct 12, 2017
michaelklishin added a commit to rabbitmq/rabbitmq-server that referenced this issue Oct 12, 2017
michaelklishin added a commit to rabbitmq/rabbitmq-server that referenced this issue Oct 12, 2017
michaelklishin added a commit to rabbitmq/rabbitmq-server that referenced this issue Oct 12, 2017
lukebakken added a commit to rabbitmq/rabbitmq-website that referenced this issue Oct 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants