module GitLab
Ported from github.com/discourse/discourse/blob/master/script/memstats.rb
Aggregate Print useful information from /proc//smaps
pss - Roughly the amount of memory that is “really” being used by the pid swap - Amount of swap this process is currently using
Reference:
http://www.mjmwired.net/kernel/Documentation/filesystems/proc.txt#361
Example:
# ./memstats.rb 4386 Process: 4386 Command Line: /usr/bin/mongod -f /etc/mongo/mongod.conf Memory Summary: private_clean 107,132 kB private_dirty 2,020,676 kB pss 2,127,860 kB rss 2,128,536 kB shared_clean 728 kB shared_dirty 0 kB size 149,281,668 kB swap 1,719,792 kB