A utility to report core memory usage per program
Project description
ps_mem
A utility to accurately report the core memory usage for a program
Yes the name is a bit weird. coremem would be more appropriate, but for backwards compatible reasons the ps_mem name remains.
Install:
pip install ps_mem
is supported, or rpm and deb packages
are available for most distros. Also the ps_mem.py script
can be run directly.
Usage:
ps_mem [-h|--help] [-p PID,...] [-s|--split-args] [-t|--total] [-w N]
[-d|--discriminate-by-pid] [-S|--swap]
Example output:
Private + Shared = RAM used Program
34.6 MiB + 1.0 MiB = 35.7 MiB gnome-terminal
139.8 MiB + 2.3 MiB = 142.1 MiB firefox
291.8 MiB + 2.5 MiB = 294.3 MiB gnome-shell
272.2 MiB + 43.9 MiB = 316.1 MiB chrome (12)
913.9 MiB + 3.2 MiB = 917.1 MiB thunderbird
---------------------------------
1.9 GiB
=================================
The [-p PID,...] option allows filtering the results. For example to restrict output to the current $USER you could:
sudo ps_mem -p $(pgrep -d, -u $USER)
or to summarize the total RAM usage per user you could:
for i in $(ps -e -o user= | sort | uniq); do
printf '%-20s%10s\n' $i $(sudo ps_mem --total -p $(pgrep -d, -u $i))
done
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ps_mem-3.14.tar.gz
(19.5 kB
view hashes)
Built Distribution
ps_mem-3.14-py2.py3-none-any.whl
(19.3 kB
view hashes)
Close
Hashes for ps_mem-3.14-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43f5cd9f173fcf20d035dd44c02dca828c914dbfb4f202b1229aa0675ff25139 |
|
MD5 | d6574219c4fd77bc03a650e6d7641f63 |
|
BLAKE2b-256 | 07e9c843b735b12d57eb77bd563a11c530e103df5fd2bbbbb9974cde7d98d515 |