<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://briansnelson.com/index.php?action=history&amp;feed=atom&amp;title=How_to_find_user_memory_usage_in_linux</id>
		<title>How to find user memory usage in linux - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://briansnelson.com/index.php?action=history&amp;feed=atom&amp;title=How_to_find_user_memory_usage_in_linux"/>
		<link rel="alternate" type="text/html" href="https://briansnelson.com/index.php?title=How_to_find_user_memory_usage_in_linux&amp;action=history"/>
		<updated>2026-06-04T07:09:17Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://briansnelson.com/index.php?title=How_to_find_user_memory_usage_in_linux&amp;diff=848&amp;oldid=prev</id>
		<title>Brian: Created page with &quot;==How to find user memory usage in linux==  Finding out who/what is using the most memory is vital when trying to figure out is causing your system to run out of memory.  Ther...&quot;</title>
		<link rel="alternate" type="text/html" href="https://briansnelson.com/index.php?title=How_to_find_user_memory_usage_in_linux&amp;diff=848&amp;oldid=prev"/>
				<updated>2015-07-09T16:33:24Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;==How to find user memory usage in linux==  Finding out who/what is using the most memory is vital when trying to figure out is causing your system to run out of memory.  Ther...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==How to find user memory usage in linux==&lt;br /&gt;
&lt;br /&gt;
Finding out who/what is using the most memory is vital when trying to figure out is causing your system to run out of memory.&lt;br /&gt;
&lt;br /&gt;
There are many ways to figure out what is using the most memory.&lt;br /&gt;
&lt;br /&gt;
===1) Find out what is using the most memory===&lt;br /&gt;
&lt;br /&gt;
 for USER in $(ps haux | awk '{print $1}' | sort -u); do ps haux | awk -v user=$USER '$1 ~ user { sum += $4} END { print user, sum; }' ; done&lt;br /&gt;
&lt;br /&gt;
===2) Find out what is using the most memory in percent===&lt;br /&gt;
&lt;br /&gt;
 TOTAL=$(free | awk '/Mem:/ { print $2 }'); for USER in $(ps haux | awk '{print $1}' | sort -u); do ps hux -U $USER | awk -v user=$USER -v total=$TOTAL '{ sum += $6 } END { printf &amp;quot;%s %.2f\n&amp;quot;, user, sum / total * 100; }'; done&lt;br /&gt;
&lt;br /&gt;
===3) If your system supports, try to install and use smem:===&lt;br /&gt;
&lt;br /&gt;
 smem -u&lt;br /&gt;
&lt;br /&gt;
 User     Count     Swap      USS      PSS      RSS &lt;br /&gt;
 gdm          1        0      308      323      820 &lt;br /&gt;
 nobody       1        0      912      932     2240 &lt;br /&gt;
 root        76        0   969016  1010829  1347768 &lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 smem -u -t -k&lt;br /&gt;
&lt;br /&gt;
 User     Count     Swap      USS      PSS      RSS &lt;br /&gt;
 gdm          1        0   308.0K   323.0K   820.0K &lt;br /&gt;
 nobody       1        0   892.0K   912.0K     2.2M &lt;br /&gt;
 root        76        0   937.6M   978.5M     1.3G &lt;br /&gt;
 ameskaas    46        0     1.2G     1.2G     1.5G&lt;/div&gt;</summary>
		<author><name>Brian</name></author>	</entry>

	</feed>