Try to determine how much RAM is currently being used per program.
Note per program, not per process.
So for example this script will report RAM used by all httpd process together.
In detail it reports: sum(private RAM for program processes) + sum(Shared RAM for program processes)
The shared RAM is problematic to calculate, and this script automatically selects the most accurate method available for your kernel.
V3.9 – 07 Mar 2017
chmod +x ps_mem.py
git clone https://github.com/pixelb/ps_mem.git
Private + Shared = RAM used Program
4.0 KiB + 11.5 KiB = 15.5 KiB uuidd
25.4 MiB + 882.5 KiB = 26.3 MiB salt-minion
1.2 GiB + 473.5 KiB = 1.2 GiB mysqld
2.7 GiB + 12.6 MiB = 2.8 GiB java (2)