Smem – Memory reporting tool
Sponsored Link
Because large portions of physical memory are typically shared among multiple applications, the standard measure of memory usage known as resident set size (RSS) will significantly overestimate memory usage. PSS instead measures each application's "fair share" of each shared area to give a realistic measure.
Smem Features
system overview listing
listings by process, mapping, user
filtering by process, mapping, or user
configurable columns from multiple data sources
configurable output units and percentages
configurable headers and totals
reading live data from /proc
reading data snapshots from directory mirrors or compressed tarballs
lightweight capture tool for embedded systems
built-in chart generation
smem has a few requirements:
a reasonably modern kernel (> 2.6.27 or so)
a reasonably recent version of Python (2.4 or so)
the matplotlib library for chart generation (optional, auto-detected)
Install smem in ubuntu
Open the terminal and run the following command
sudo apt-get install smem
Using Smem
Syntax
smem option
Show basic process information -- smem
Show library-oriented view -- smem -m
Show user-oriented view -- smem -u
Show system view -- smem -R 4G -K /path/to/vmlinux -w
Show totals and percentages -- smem -t -p
Show different columns -- smem -c "name user pss"
Sort by reverse RSS -- smem -s rss -r
Show processes filtered by mapping -- smem -M libxml
Show mappings filtered by process -- smem -m -P [e]volution
Read data from capture tarball -- smem --source capture.tar.gz
Show a bar chart labeled by pid -- smem --bar pid -c "pss uss"
Show a pie chart of RSS labeled by name -- smem --pie name -s rss