Skip to main content

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.

Usage:

```
ps_mem [-h|--help] [-p PID,...] [-s|--split-args] [-t|--total] [-w N]
```

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


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.6.tar.gz (17.5 kB view details)

Uploaded Source

File details

Details for the file ps_mem-3.6.tar.gz.

File metadata

  • Download URL: ps_mem-3.6.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ps_mem-3.6.tar.gz
Algorithm Hash digest
SHA256 2ef813d0dd8469999f81af86a36cde12afae78aff8f51c2cb7ae11970d1316a6
MD5 99ea2c3541c419e3d8881ee62e030af1
BLAKE2b-256 3a76c6a59783eb2cc198c7f26747798ef11f24ad315badf90ce325e1066d0c92

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page