![]() |
Memory Used by a process in Linux
How to find the memory utilized by a parent process in Linux?
If there is 1 main process and 3 child processes for that, I want to know how much memory is being used in total by the 1 parent and 3 child processes. I know only PPID. We are using Redhat AS 2.1. In our application, one Java process is creating 100s of threads. I want to know the total amount of memory is being used by that process. Thanks in advance, Kishore |
How about the following?
Code:
(size=0; count=0; for i in $(ps --no-headers --pid=PPID --ppid=PPID -o rss); do (( size += i, count++ )); done; echo "$size KB in $count processes.") |
| All times are GMT -5. The time now is 12:58 AM. |