Process Working Set Info in LINUX
I am finding Working Set Size of process in proc folder
this link say that I can find working set size in /proc but I don't know how to know. I knew RSS is working set size but RSS is different from working set size can I know working set size using /proc/[pid]/statm
?
RSS (resident virtual size) is how much memory this process currently has in main memory (RAM). VSZ (virtual size) is how much virtual memory the process has in total.
From your question I believe you're after virtual size, i.e. total memory usage.
Regarding
statm
- from Linux manpages:So you need the first integer, which will return total page count used. If you however need in more readable output,
status
will provide information in kilobytes. For example:This means process 29262 uses 5980 kB, out of which 1736 resides in RAM.