Monitoring memory utilization on Linux box is one of the important task for Linux Administrator to make the system up and running smoothly. There are plenty of commands/tools are available to monitor memory utilization on Linux, each one is working in different manner, today we are going to show you about smem.
smem is a tool that can give numerous reports on memory usage on Linux systems. Unlike existing tools, smem can report Proportional Set Size (PSS), Unique Set Size (USS) & Resident Set Size (RSS).
Proportional Set Size (PSS) : Representation of the amount of memory used by libraries and applications in a virtual memory system.
Unique Set Size (USS) : Un shared memory is reported as the USS (Unique Set Size).
Resident Set Size (RSS) : The standard measure of physical memory (it typically shared among multiple applications) usage known as resident set size (RSS) will significantly overestimate memory usage.
The USS and PSS only include physical memory usage. They do not include memory that has been swapped out to disk. Memory can be reported by process, by user, by mapping, or system wide and possible to get the output via text mode and graphical mode.
PSS measures each applications & libraries fair share
memory for realistic measure. It pull most of the data from the /proc file system.
smem has a utility called smemcap
which used to capture memory statistics on running systems. smemcap captures all /proc
entries required by smem and store the data as a uncompressed .tar
file. smem can analyze the output using the –source option.
By default most of the modern system fulfill the basic requirements for smem like kernel (> 2.6.27) & Python (2.4 or later) except matplotlib library package for chart generation that to for optional.
Suggested Read :
(#) Free – A Standard Tool to check Memory Usage Statistics
(#) vmstat – A Standard Nifty Tool to Report Virtual Memory Statistics
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
Installation of smem in Linux
Most of the distributions (Debian, Ubuntu, Mint, Fedora, suse, openSUSE, Arch Linux, Manjaro, Mageia, etc.) has the smem package, so we can easily install it from distribution official repository.
For Debian/Ubuntu
systems, use APT-GET command or APT Command to install smem.
$ sudo apt-get install smem $ sudo apt-get install python-matplotlib
For RHEL/CentOS
systems, enable EPEL Repository and use YUM Command to install smem.
$ sudo yum install smem $ sudo yum install python-matplotlib
For Fedora
systems, use DNF Command to install smem.
$ sudo dnf install smem $ sudo dnf install python-matplotlib
For Arch Linux
system, use Pacman Command to install smem since it’s available from distribution official repository.
$ sudo pacman -S smem $ sudo pacman -S python2-matplotlib
For openSUSE
system, use Zypper Command to install smem.
$ sudo zypper install smem $ sudo zypper install python-matplotlib
Run smem without any options
After successfully smem installed with help of above command. Just fire the below command on terminal to mesure memory usage.
$ smem PID User Command Swap USS PSS RSS 2054 magi sleep infinity 80 4 10 740 1864 magi sleep infinity 80 4 11 764 2416 magi /usr/lib/gvfs/gvfs-goa-volu 612 4 22 2168 1698 magi /usr/lib/gvfs/gvfsd-fuse /r 788 4 23 2236 2248 magi /usr/lib/x86_64-linux-gnu/i 716 4 24 2284 2401 magi /usr/lib/gvfs/gvfs-afc-volu 1188 4 24 2356 2439 magi /usr/lib/gvfs/gvfs-mtp-volu 644 4 25 2276 2247 magi /usr/lib/x86_64-linux-gnu/i 3028 4 27 2484 1820 magi /usr/lib/at-spi2-core/at-sp 2724 4 28 2428 2424 magi /usr/lib/gvfs/gvfs-gphoto2- 784 8 29 2384 2403 magi /usr/lib/evolution/evolutio 3216 4 30 2624 2405 magi /usr/lib/evolution/evolutio 5048 4 30 2672 1690 magi /usr/lib/dconf/dconf-servic 744 16 34 2164 2382 magi /usr/lib/evolution/evolutio 5324 4 34 2816 2435 magi /usr/lib/evolution/evolutio 3332 4 42 2836 2383 magi /usr/lib/gvfs/gvfs-udisks2- 1660 4 43 2620 3574 magi sleep 2h 44 44 51 832 2350 magi /usr/lib/evolution/evolutio 6560 4 54 3572 2542 magi /bin/sh -c /usr/lib/x86_64- 88 4 56 848 2339 magi sh /home/magi/.config/ukuu- 88 4 57 936 1871 magi /bin/sh -e /proc/self/fd/9 84 4 58 964 1880 magi /usr/lib/x86_64-linux-gnu/u 2504 4 65 2720 1693 magi /usr/lib/gvfs/gvfsd 764 84 125 2376 2471 magi /usr/bin/redshift -v 360 132 157 2324 1891 magi upstart-dbus-bridge --daemo 180 140 169 880 1767 magi /usr/bin/xbrlapi -q 460 184 202 1776 1909 magi upstart-file-bridge --daemo 444 204 218 856 3821 magi /usr/lib/gvfs/gvfsd-dnssd - 764 196 226 2736 4175 magi /bin/bash /usr/bin/battery- 0 220 227 1128 1893 magi upstart-dbus-bridge --daemo 236 236 267 1116 1868 magi upstart-udev-bridge --daemo 184 244 294 1380 3632 magi /usr/lib/x86_64-linux-gnu/g 404 308 333 2444 1825 magi /usr/bin/dbus-daemon --conf 272 308 365 1924 1827 magi /usr/lib/at-spi2-core/at-sp 2444 372 400 2992 2168 magi /usr/lib/ibus/ibus-dconf 324 380 407 2708 3412 magi /usr/lib/x86_64-linux-gnu/d 704 384 408 2848 2493 magi /usr/lib/gvfs/gvfsd-metadat 256 404 423 2644 2232 magi /usr/lib/ibus/ibus-engine-s 288 456 486 2864 2298 magi /usr/lib/x86_64-linux-gnu/i 1180 464 527 4040 3803 magi /usr/lib/gvfs/gvfsd-network 460 648 766 3292 1639 magi /lib/systemd/systemd --user 852 524 783 2788 2262 magi /usr/lib/x86_64-linux-gnu/i 312 740 865 3472 2278 magi /usr/lib/x86_64-linux-gnu/i 2468 852 872 3132
Show the output in MB
By default memory usage output shows on KB which may get confuse, add k
option with smem to get the ouput in MB
.
$ smem -k PID User Command Swap USS PSS RSS 2054 magi sleep infinity 80.0K 4.0K 10.0K 740.0K 1864 magi sleep infinity 80.0K 4.0K 11.0K 764.0K 1698 magi /usr/lib/gvfs/gvfsd-fuse /r 788.0K 4.0K 22.0K 2.1M 2416 magi /usr/lib/gvfs/gvfs-goa-volu 612.0K 4.0K 22.0K 2.1M 2248 magi /usr/lib/x86_64-linux-gnu/i 716.0K 4.0K 23.0K 2.2M 2401 magi /usr/lib/gvfs/gvfs-afc-volu 1.2M 4.0K 24.0K 2.3M 2439 magi /usr/lib/gvfs/gvfs-mtp-volu 644.0K 4.0K 24.0K 2.2M 2247 magi /usr/lib/x86_64-linux-gnu/i 3.0M 4.0K 26.0K 2.4M 1820 magi /usr/lib/at-spi2-core/at-sp 2.7M 4.0K 27.0K 2.3M 2403 magi /usr/lib/evolution/evolutio 3.1M 4.0K 28.0K 2.5M 2405 magi /usr/lib/evolution/evolutio 4.9M 4.0K 28.0K 2.5M 2424 magi /usr/lib/gvfs/gvfs-gphoto2- 784.0K 8.0K 29.0K 2.3M 2382 magi /usr/lib/evolution/evolutio 5.2M 4.0K 32.0K 2.7M 1690 magi /usr/lib/dconf/dconf-servic 744.0K 16.0K 34.0K 2.1M 2435 magi /usr/lib/evolution/evolutio 3.3M 4.0K 38.0K 2.7M 2383 magi /usr/lib/gvfs/gvfs-udisks2- 1.6M 4.0K 42.0K 2.5M 3574 magi sleep 2h 44.0K 44.0K 51.0K 832.0K 2350 magi /usr/lib/evolution/evolutio 6.4M 4.0K 52.0K 3.4M 2542 magi /bin/sh -c /usr/lib/x86_64- 88.0K 4.0K 56.0K 848.0K 2339 magi sh /home/magi/.config/ukuu- 88.0K 4.0K 57.0K 936.0K 1871 magi /bin/sh -e /proc/self/fd/9 84.0K 4.0K 58.0K 964.0K 1880 magi /usr/lib/x86_64-linux-gnu/u 2.4M 4.0K 63.0K 2.6M 1693 magi /usr/lib/gvfs/gvfsd 764.0K 56.0K 83.0K 2.2M 2471 magi /usr/bin/redshift -v 360.0K 132.0K 157.0K 2.3M 1891 magi upstart-dbus-bridge --daemo 180.0K 140.0K 169.0K 880.0K 1767 magi /usr/bin/xbrlapi -q 460.0K 184.0K 201.0K 1.7M 1909 magi upstart-file-bridge --daemo 444.0K 204.0K 218.0K 856.0K 3821 magi /usr/lib/gvfs/gvfsd-dnssd - 764.0K 196.0K 225.0K 2.6M 4175 magi /bin/bash /usr/bin/battery- 0 220.0K 227.0K 1.1M 1893 magi upstart-dbus-bridge --daemo 236.0K 236.0K 267.0K 1.1M 1868 magi upstart-udev-bridge --daemo 184.0K 244.0K 294.0K 1.3M 3632 magi /usr/lib/x86_64-linux-gnu/g 404.0K 308.0K 333.0K 2.4M 1825 magi /usr/bin/dbus-daemon --conf 272.0K 308.0K 365.0K 1.9M 1827 magi /usr/lib/at-spi2-core/at-sp 2.4M 372.0K 400.0K 2.9M 3412 magi /usr/lib/x86_64-linux-gnu/d 704.0K 384.0K 405.0K 2.7M 2168 magi /usr/lib/ibus/ibus-dconf 324.0K 380.0K 407.0K 2.6M 2493 magi /usr/lib/gvfs/gvfsd-metadat 256.0K 396.0K 415.0K 2.5M 2232 magi /usr/lib/ibus/ibus-engine-s 288.0K 456.0K 485.0K 2.8M 2298 magi /usr/lib/x86_64-linux-gnu/i 1.2M 464.0K 526.0K 3.9M 3803 magi /usr/lib/gvfs/gvfsd-network 468.0K 552.0K 572.0K 2.9M 1639 magi /lib/systemd/systemd --user 852.0K 524.0K 714.0K 2.6M 2278 magi /usr/lib/x86_64-linux-gnu/i 2.4M 716.0K 734.0K 2.9M 1875 magi /usr/lib/x86_64-linux-gnu/h 520.0K 420.0K 827.0K 3.0M 2262 magi /usr/lib/x86_64-linux-gnu/i 312.0K 716.0K 850.0K 3.3M 2271 magi /usr/lib/x86_64-linux-gnu/i 2.8M 828.0K 992.0K 4.0M 2115 magi /usr/lib/gnome-session/gnom 1.5M 980.0K 1.0M 4.3M 1728 magi /sbin/upstart --user 420.0K 1.1M 1.1M 2.6M
show total memory usage
Even the output shows in MB
, to get the total memory with smem, add t
option.
$ smem -tk PID User Command Swap USS PSS RSS 2054 magi sleep infinity 80.0K 4.0K 10.0K 740.0K 1864 magi sleep infinity 80.0K 4.0K 11.0K 764.0K 1698 magi /usr/lib/gvfs/gvfsd-fuse /r 788.0K 4.0K 22.0K 2.1M 2416 magi /usr/lib/gvfs/gvfs-goa-volu 612.0K 4.0K 22.0K 2.1M 2248 magi /usr/lib/x86_64-linux-gnu/i 716.0K 4.0K 23.0K 2.2M 2401 magi /usr/lib/gvfs/gvfs-afc-volu 1.2M 4.0K 24.0K 2.3M 2439 magi /usr/lib/gvfs/gvfs-mtp-volu 644.0K 4.0K 24.0K 2.2M 2247 magi /usr/lib/x86_64-linux-gnu/i 3.0M 4.0K 26.0K 2.4M 4193 magi bash 0 2.7M 2.7M 3.7M 2152 magi /usr/bin/ibus-daemon --daem 920.0K 2.7M 2.7M 5.1M 2186 magi /usr/lib/ibus/ibus-x11 --ki 3.4M 2.6M 2.8M 8.1M 2320 magi /usr/lib/unity-settings-dae 3.2M 2.7M 2.9M 8.0M 2273 magi /usr/lib/x86_64-linux-gnu/i 4.0M 2.7M 2.9M 8.3M 2325 magi nm-applet 3.9M 2.7M 2.9M 8.6M 2237 magi /usr/bin/pulseaudio --start 1.2M 2.9M 3.2M 5.6M 2280 magi /usr/lib/policykit-1-gnome/ 2.2M 3.6M 3.7M 8.9M 2621 magi update-notifier 1.8M 4.3M 4.6M 11.2M 2180 magi /usr/lib/ibus/ibus-ui-gtk3 3.2M 4.7M 5.0M 11.4M 3421 magi /usr/lib/x86_64-linux-gnu/u 3.4M 5.4M 5.4M 8.0M 1819 magi /usr/lib/x86_64-linux-gnu/n 1.7M 5.8M 6.1M 12.8M 2270 magi /usr/lib/x86_64-linux-gnu/i 2.0M 6.1M 6.3M 11.7M 2103 magi /usr/lib/unity-settings-dae 3.3M 5.9M 6.4M 13.0M 3431 magi /usr/bin/unity-scope-loader 2.2M 6.6M 6.6M 9.4M 2337 magi /usr/bin/python3 /usr/bin/r 10.4M 6.2M 6.8M 12.9M 4176 magi python3 /usr/share/battery- 0 7.8M 8.2M 11.0M 1900 magi /usr/lib/x86_64-linux-gnu/b 1.8M 8.0M 8.2M 14.1M 2042 magi /usr/lib/x86_64-linux-gnu/h 3.5M 9.4M 9.9M 13.1M 5546 magi /usr/bin/python /usr/bin/sm 0 13.1M 13.2M 14.5M 4073 magi /usr/lib/gnome-terminal/gno 0 12.2M 13.9M 22.0M 2299 magi /usr/bin/gnome-software --g 54.4M 14.8M 15.0M 20.6M 2214 magi /usr/lib/x86_64-linux-gnu/u 1.2M 15.9M 16.6M 23.8M 2300 magi nautilus -n 6.2M 17.2M 18.7M 27.1M 3459 magi inkscape 66.6M 69.7M 70.8M 76.8M 3937 magi /usr/bin/perl /usr/bin/shut 35.5M 80.5M 83.2M 91.2M 2202 magi /usr/bin/compiz 102.8M 186.4M 188.4M 197.7M 3593 magi /usr/lib/firefox/firefox 48.2M 174.9M 221.6M 275.5M 3694 magi /usr/lib/firefox/plugin-con 12.0M 854.8M 892.6M 937.2M ------------------------------------------------------------------------------- 84 1 450.2M 1.5G 1.6G 2.0G
Report memory usage by user
We can easily sort the memory usage based on the users by adding u
option with smem command. By default memory usage output shows on KB which may get confuse, so i have added k
option on every output which will shows the smem output in MB
.
$ smem -uk User Count Swap USS PSS RSS magi 84 465.4M 1.5G 1.6G 1.9G
Report memory usage by mapping
$ smem -mk Map PIDs AVGPSS PSS /bin/sleep 3 0 0 /usr/lib/x86_64-linux-gnu/libasound.so.2 4 89.0K 356.0K /dev/shm/org.chromium.Nl1Ffr 2 179.0K 358.0K /usr/lib/firefox/libmozsqlite3.so 2 180.0K 360.0K /lib/x86_64-linux-gnu/ld-2.24.so 84 4.0K 372.0K /lib/x86_64-linux-gnu/libdbus-1.so.3.14. 40 9.0K 388.0K /usr/lib/x86_64-linux-gnu/libunity-core- 1 388.0K 388.0K /usr/lib/x86_64-linux-gnu/libpixman-1.so 26 15.0K 395.0K /usr/lib/x86_64-linux-gnu/libQt5DBus.so. 2 198.0K 396.0K /usr/lib/x86_64-linux-gnu/libQt5Widgets. 1 460.0K 460.0K /dev/shm/org.chromium.Jy3D89 2 232.0K 464.0K /dev/shm/org.chromium.tyAI7q 2 232.0K 464.0K /usr/lib/x86_64-linux-gnu/libnux-4.0.so. 1 484.0K 484.0K /usr/lib/x86_64-linux-gnu/libnux-graphic 1 484.0K 484.0K /usr/lib/firefox/libmozavcodec.so 2 244.0K 488.0K /usr/lib/x86_64-linux-gnu/libgobject-2.0 63 8.0K 514.0K /usr/lib/x86_64-linux-gnu/libsqlite3.so. 15 35.0K 527.0K /lib/x86_64-linux-gnu/libm-2.24.so 48 11.0K 543.0K /usr/lib/x86_64-linux-gnu/libgnutls.so.3 10 54.0K 544.0K /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0 2 288.0K 576.0K /usr/lib/x86_64-linux-gnu/libcompiz_core 1 588.0K 588.0K /usr/bin/inkscape 1 612.0K 612.0K /usr/lib/x86_64-linux-gnu/libX11.so.6.3. 32 21.0K 693.0K /usr/lib/x86_64-linux-gnu/libfreetype.so 27 27.0K 748.0K /usr/lib/x86_64-linux-gnu/libcairo.so.2. 26 29.0K 773.0K /usr/lib/x86_64-linux-gnu/libstdc++.so.6 39 20.0K 803.0K /usr/lib/x86_64-linux-gnu/libxml2.so.2.9 19 42.0K 804.0K /usr/lib/x86_64-linux-gnu/libQt5Core.so. 4 204.0K 818.0K /usr/lib/x86_64-linux-gnu/libgdk-3.so.0. 24 37.0K 890.0K /usr/lib/x86_64-linux-gnu/libavcodec.so. 2 448.0K 896.0K /lib/x86_64-linux-gnu/libglib-2.0.so.0.5 64 14.0K 913.0K /bin/bash 3 306.0K 920.0K /usr/bin/python3.5 2 712.0K 1.4M /usr/lib/x86_64-linux-gnu/libgio-2.0.so. 63 26.0K 1.6M [stack] 84 19.0K 1.6M /lib/x86_64-linux-gnu/libc-2.24.so 84 24.0K 2.0M /usr/bin/python2.7 1 2.2M 2.2M /usr/lib/x86_64-linux-gnu/libgtk-3.so.0. 24 99.0K 2.3M /usr/lib/x86_64-linux-gnu/compiz/libunit 1 2.6M 2.6M /usr/lib/x86_64-linux-gnu/dri/swrast_dri 2 1.6M 3.2M /SYSV00000000 9 1.5M 13.7M /usr/lib/x86_64-linux-gnu/libLLVM-3.8.so 2 8.6M 17.2M /dev/shm/org.chromium.CIGPNj 2 11.3M 22.6M /dev/shm/org.chromium.xtJGew 2 12.5M 25.0M /usr/lib/firefox/libxul.so 2 19.0M 38.0M [heap] 82 4.8M 397.3M 84 11.4M 960.7M
Report system wide memory usage summary
$ smem -wk Area Used Cache Noncache firmware/hardware 0 0 0 kernel image 0 0 0 kernel dynamic memory 153.5M 53.3M 100.2M userspace memory 1.6G 180.7M 1.4G free memory 195.5M 195.5M 0
show memory usage in percentages
$ smem -p PID User Command Swap USS PSS RSS 2054 magi sleep infinity 0.00% 0.00% 0.00% 0.04% 1864 magi sleep infinity 0.00% 0.00% 0.00% 0.04% 1698 magi /usr/lib/gvfs/gvfsd-fuse /r 0.04% 0.00% 0.00% 0.11% 2416 magi /usr/lib/gvfs/gvfs-goa-volu 0.03% 0.00% 0.00% 0.10% 2248 magi /usr/lib/x86_64-linux-gnu/i 0.03% 0.00% 0.00% 0.11% 2401 magi /usr/lib/gvfs/gvfs-afc-volu 0.06% 0.00% 0.00% 0.11% 2439 magi /usr/lib/gvfs/gvfs-mtp-volu 0.03% 0.00% 0.00% 0.11% 2262 magi /usr/lib/x86_64-linux-gnu/i 0.01% 0.04% 0.04% 0.17% 2271 magi /usr/lib/x86_64-linux-gnu/i 0.14% 0.04% 0.05% 0.20% 2115 magi /usr/lib/gnome-session/gnom 0.07% 0.05% 0.05% 0.21% 1728 magi /sbin/upstart --user 0.02% 0.06% 0.06% 0.13% 2331 magi /usr/lib/evolution/evolutio 0.19% 0.05% 0.06% 0.22% 2263 magi /usr/lib/x86_64-linux-gnu/i 0.28% 0.05% 0.06% 0.20% 2535 magi zeitgeist-datahub 0.09% 0.06% 0.07% 0.25% 1662 magi /usr/bin/dbus-daemon --sess 0.01% 0.07% 0.07% 0.14% 4082 magi bash 0.00% 0.09% 0.09% 0.14% 2553 magi /usr/lib/x86_64-linux-gnu/z 0.06% 0.11% 0.11% 0.24% 2546 magi /usr/bin/zeitgeist-daemon 0.03% 0.12% 0.12% 0.24% 2152 magi /usr/bin/ibus-daemon --daem 0.06% 0.12% 0.12% 0.24% 2186 magi /usr/lib/ibus/ibus-x11 --ki 0.18% 0.12% 0.13% 0.40% 2454 magi /usr/lib/gvfs/gvfsd-trash - 0.02% 0.13% 0.13% 0.24% 4193 magi bash 0.00% 0.14% 0.14% 0.19% 2320 magi /usr/lib/unity-settings-dae 0.16% 0.14% 0.14% 0.40% 2273 magi /usr/lib/x86_64-linux-gnu/i 0.19% 0.14% 0.14% 0.42% 2325 magi nm-applet 0.19% 0.14% 0.14% 0.43% 2237 magi /usr/bin/pulseaudio --start 0.06% 0.14% 0.16% 0.28% 2280 magi /usr/lib/policykit-1-gnome/ 0.11% 0.18% 0.19% 0.44% 2621 magi update-notifier 0.09% 0.21% 0.23% 0.56% 2180 magi /usr/lib/ibus/ibus-ui-gtk3 0.15% 0.24% 0.25% 0.57% 3421 magi /usr/lib/x86_64-linux-gnu/u 0.17% 0.27% 0.27% 0.40% 1819 magi /usr/lib/x86_64-linux-gnu/n 0.08% 0.29% 0.31% 0.64% 2103 magi /usr/lib/unity-settings-dae 0.17% 0.29% 0.31% 0.65% 2270 magi /usr/lib/x86_64-linux-gnu/i 0.10% 0.31% 0.32% 0.58% 3431 magi /usr/bin/unity-scope-loader 0.11% 0.33% 0.33% 0.47% 2337 magi /usr/bin/python3 /usr/bin/r 0.51% 0.31% 0.34% 0.64% 1900 magi /usr/lib/x86_64-linux-gnu/b 0.11% 0.37% 0.39% 0.68% 4176 magi python3 /usr/share/battery- 0.00% 0.38% 0.40% 0.54% 2042 magi /usr/lib/x86_64-linux-gnu/h 0.21% 0.43% 0.45% 0.62% 5614 magi /usr/bin/python /usr/bin/sm 0.00% 0.61% 0.62% 0.68% 4073 magi /usr/lib/gnome-terminal/gno 0.00% 0.62% 0.70% 1.10% 2299 magi /usr/bin/gnome-software --g 2.66% 0.74% 0.75% 1.03% 2214 magi /usr/lib/x86_64-linux-gnu/u 0.10% 0.75% 0.79% 1.14% 2300 magi nautilus -n 0.30% 0.86% 0.94% 1.35% 3459 magi inkscape 3.56% 3.21% 3.25% 3.53% 3937 magi /usr/bin/perl /usr/bin/shut 1.74% 4.03% 4.16% 4.56% 2202 magi /usr/bin/compiz 5.02% 9.47% 9.57% 10.03% 3593 magi /usr/lib/firefox/firefox 2.57% 8.90% 10.89% 13.24% 3694 magi /usr/lib/firefox/plugin-con 0.66% 38.41% 39.97% 41.87%
Numeric output
$ smem -nk PID User Command Swap USS PSS RSS 2054 1000 sleep infinity 80.0K 4.0K 10.0K 740.0K 2535 1000 zeitgeist-datahub 1.9M 1.3M 1.3M 4.9M 1662 1000 /usr/bin/dbus-daemon --sess 292.0K 1.3M 1.4M 2.8M 4082 1000 bash 0 1.9M 1.9M 2.8M 2553 1000 /usr/lib/x86_64-linux-gnu/z 1.3M 2.2M 2.3M 4.8M 2546 1000 /usr/bin/zeitgeist-daemon 548.0K 2.3M 2.4M 4.7M 2152 1000 /usr/bin/ibus-daemon --daem 1.2M 2.4M 2.4M 4.8M 2186 1000 /usr/lib/ibus/ibus-x11 --ki 3.6M 2.5M 2.6M 7.9M 2454 1000 /usr/lib/gvfs/gvfsd-trash - 504.0K 2.6M 2.6M 4.9M 4193 1000 bash 0 2.7M 2.8M 3.8M 2320 1000 /usr/lib/unity-settings-dae 3.2M 2.7M 2.9M 8.0M 2273 1000 /usr/lib/x86_64-linux-gnu/i 4.0M 2.7M 2.9M 8.3M 2325 1000 nm-applet 3.9M 2.7M 2.9M 8.6M 2237 1000 /usr/bin/pulseaudio --start 1.2M 2.7M 2.9M 5.4M 2280 1000 /usr/lib/policykit-1-gnome/ 2.2M 3.6M 3.7M 8.9M 2621 1000 update-notifier 1.8M 4.3M 4.6M 11.1M 2180 1000 /usr/lib/ibus/ibus-ui-gtk3 3.2M 4.7M 5.0M 11.4M 3421 1000 /usr/lib/x86_64-linux-gnu/u 3.4M 5.4M 5.4M 7.9M 1819 1000 /usr/lib/x86_64-linux-gnu/n 1.7M 5.8M 6.1M 12.8M 2103 1000 /usr/lib/unity-settings-dae 3.4M 5.8M 6.3M 12.9M 2270 1000 /usr/lib/x86_64-linux-gnu/i 2.0M 6.1M 6.3M 11.6M 3431 1000 /usr/bin/unity-scope-loader 2.2M 6.6M 6.6M 9.4M 2337 1000 /usr/bin/python3 /usr/bin/r 10.4M 6.2M 6.8M 12.8M 1900 1000 /usr/lib/x86_64-linux-gnu/b 2.3M 7.5M 7.7M 13.6M 4176 1000 python3 /usr/share/battery- 0 7.7M 8.1M 10.8M 2042 1000 /usr/lib/x86_64-linux-gnu/h 4.2M 8.7M 9.1M 12.3M 5625 1000 /usr/bin/python /usr/bin/sm 0 12.2M 12.3M 13.7M 4073 1000 /usr/lib/gnome-terminal/gno 0 12.3M 14.0M 22.0M 2299 1000 /usr/bin/gnome-software --g 54.4M 14.8M 15.0M 20.6M 2214 1000 /usr/lib/x86_64-linux-gnu/u 2.1M 15.0M 15.7M 22.8M 2300 1000 nautilus -n 6.2M 17.2M 18.7M 27.0M 3459 1000 inkscape 72.9M 64.1M 64.9M 70.5M 3937 1000 /usr/bin/perl /usr/bin/shut 35.5M 80.4M 83.2M 91.1M 2202 1000 /usr/bin/compiz 102.8M 189.1M 191.2M 200.4M 3593 1000 /usr/lib/firefox/firefox 52.6M 178.5M 224.3M 277.4M 3694 1000 /usr/lib/firefox/plugin-con 13.5M 751.2M 788.5M 832.4M
Generating Graphical Output
As we already told beginning of the article, option to generate memory usage in graphical output based on USS, PSS & RSS. Follow the below steps to generate the graphical output.
Pie chart based on USS
# smem --pie name -s uss
Pie chart based on PSS
# smem --pie name -s pss
Pie chart based on RSS
# smem --pie name -s rss
Bar chart combination of USS, PSS & RSS
# smem --bar name -c "pss uss rss"
Read more about smem
If you want to know more option which is available for smem, simply navigate to man page.
# smem --help or # man smem