I have an application in which several processes communicate with each other
through shared memory and other IPC mechanisms.
All of these processes share a great deal of common code (such as the Java
Runtime, Oracle libraries etc).
I would like to know how much physical memory this application uses, but
simply using the SZ field of the ps(1) command does not
give a realistic nuber as shared memory regions are counted more than once.
One way I could imagine would be to run pmap on all processes and add the
individual private regions plus the shared ones. But I'm
almost sure that must be an easier way(?).