nickva commented on issue #5821:
URL: https://github.com/apache/couchdb/issues/5821#issuecomment-3756051080

   If you want, it's not that hard to add it.
   
   Need two things:
   
   1) enable  mem_sup first in vm.args
   
   ```diff
   --os_mon start_memsup false
   +-os_mon start_memsup true
   ```
   
   2) Get the memory data in the _system call from memsup:
   
   /src/chttpd/src/chttpd_node.erl
   ```diff
        [
            {memory, {Memory}},
   +        {system_memory, {memsup:get_system_memory_data()}},
            {run_queue, SQ},
   ```
   
   This should do what you want:
   ```
   % http $DB/_node/_local/_system | jq '.system_memory'
   {
     "system_total_memory": 17179869184,
     "free_memory": 343363584,
     "total_memory": 17179869184
   }
   ```
   
   But I agree in general with Bob and Jan that it may be better to get this 
from your infra stack as it would have a better view of system metrics. This is 
gathered by Erlang VM and I am not sure how reliable or maintained this system 
is, if it works on Windows or other OSes properly etc.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to