I'm trying to check how much memory strain a process is actually putting on the system, but
top and friends are almost useless for that purpose as they only report 3 statistics:
RES- the resident memory set includes only data pages that in physical memory (not including swapped out pages) but also includes loaded shared libraries.
VIRT- includes all pages mapped to the memory by the kernel, including swapped out pages but also memory mapped files, shared libraries, etc.
SHR- possibly the most useless of all, includes just the memory used by libraries that can be shared, but as I understand it, it does not actually account for memory used by the process but counts the entire size of the library even if only part of it is actually resident.
In multi-process computing software, I want to know how much memory will be used/freed by running or killing another process with a similar or identical shared memory/libraries as existing ones, which means I need to know how large is the data set used by the process - including all swapped out data pages but excluding all non-data pages, such as shared libraries, shared memory pages, memory mapped files, etc.
I'm not afraid of some coding but it will be better if there's already a
top replacement I'm not aware of that shows that information.