Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everybody,

This may be the known question but before asking this I had searched a lot but did not find the precise answer.

1.) How to find out the Heap, Stack and Swap memory usage of current running process in Linux box?
2.) How to find out total and dynamic Heap and Stack allocated in the entire Linux box?

I know to find out the Heap memory usage of current running process as below
$ awk '{print $23}' /proc/{process_id}/stat
But this is achieved by opening a file rather I wanted to find this out with the direct command.

Also, I hope this question arises in many others mind and would be very helpful for the answer.
Many thanks.
Posted

1 solution

Possibly you have to use a tool. See for instance this Stack Overflow question: "How to measure actual memory usage of an application or process?"[^].
 
Share this answer
 
Comments
krishna kishore58 1-Dec-15 7:34am    
Many thanks for you reply. Can I have some close answers please? Would be appreciated as this is very much needed during application issue time.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900