Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A utility to accurately report the in core memory usage for a program

License

NotificationsYou must be signed in to change notification settings

pixelb/ps_mem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 packagesare available for most distros. Also the ps_mem.py scriptcan 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-terminal139.8 MiB +   2.3 MiB = 142.1 MiB       firefox291.8 MiB +   2.5 MiB = 294.3 MiB       gnome-shell272.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:

foriin$(ps -e -o user=| sort| uniq);doprintf'%-20s%10s\n'$i$(sudo ps_mem --total -p$(pgrep -d, -u$i))done

About

A utility to accurately report the in core memory usage for a program

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp