<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.zarafa.com/wiki/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.zarafa.com/wiki/index.php?title=Find_out_which_processes_are_Swapping&amp;feed=atom&amp;action=history</id>
		<title>Find out which processes are Swapping - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.zarafa.com/wiki/index.php?title=Find_out_which_processes_are_Swapping&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://www.zarafa.com/wiki/index.php?title=Find_out_which_processes_are_Swapping&amp;action=history"/>
		<updated>2013-05-26T09:42:38Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://www.zarafa.com/wiki/index.php?title=Find_out_which_processes_are_Swapping&amp;diff=2283&amp;oldid=prev</id>
		<title>Paulb at 12:19, 2 January 2013</title>
		<link rel="alternate" type="text/html" href="http://www.zarafa.com/wiki/index.php?title=Find_out_which_processes_are_Swapping&amp;diff=2283&amp;oldid=prev"/>
				<updated>2013-01-02T12:19:05Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:19, 2 January 2013&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ever wanted to know which processes are swapping and how much swap space they are using. Starting from kernel 2.6.16, we can find out using smaps which can be found in the proc filesystem. The script below will make it easy for you and lists all processes and how much swap space they are using.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ever wanted to know which processes are swapping and how much swap space they are using. Starting from kernel 2.6.16, we can find out using smaps which can be found in the proc filesystem. The script below will make it easy for you and lists all processes and how much swap space they are using &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and must be run by root&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;SUM=0&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;SUM=0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;OVERALL=0&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;OVERALL=0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;if [ &amp;quot;$(id -u)&amp;quot; != &amp;quot;0&amp;quot; ]; then&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;nbsp;  echo &amp;quot;This script must be run as root&amp;quot; 1&amp;gt;&amp;amp;2&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;nbsp;  exit 1&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;fi&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;for DIR in `find /proc/ -maxdepth 1 -type d | egrep &amp;quot;^/proc/[0-9]&amp;quot;` ; do&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;for DIR in `find /proc/ -maxdepth 1 -type d | egrep &amp;quot;^/proc/[0-9]&amp;quot;` ; do&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Paulb</name></author>	</entry>

	<entry>
		<id>http://www.zarafa.com/wiki/index.php?title=Find_out_which_processes_are_Swapping&amp;diff=1748&amp;oldid=prev</id>
		<title>Mverwijs at 07:08, 23 September 2011</title>
		<link rel="alternate" type="text/html" href="http://www.zarafa.com/wiki/index.php?title=Find_out_which_processes_are_Swapping&amp;diff=1748&amp;oldid=prev"/>
				<updated>2011-09-23T07:08:42Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 07:08, 23 September 2011&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;echo &amp;quot;Overall swap used: $OVERALL&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;echo &amp;quot;Overall swap used: $OVERALL&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Debug]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mverwijs</name></author>	</entry>

	<entry>
		<id>http://www.zarafa.com/wiki/index.php?title=Find_out_which_processes_are_Swapping&amp;diff=1747&amp;oldid=prev</id>
		<title>Msartor: Created page with &quot;Ever wanted to know which processes are swapping and how much swap space they are using. Starting from kernel 2.6.16, we can find out using smaps which can be found in the proc f...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.zarafa.com/wiki/index.php?title=Find_out_which_processes_are_Swapping&amp;diff=1747&amp;oldid=prev"/>
				<updated>2011-09-22T10:59:28Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;Ever wanted to know which processes are swapping and how much swap space they are using. Starting from kernel 2.6.16, we can find out using smaps which can be found in the proc f...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Ever wanted to know which processes are swapping and how much swap space they are using. Starting from kernel 2.6.16, we can find out using smaps which can be found in the proc filesystem. The script below will make it easy for you and lists all processes and how much swap space they are using.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
SUM=0&lt;br /&gt;
OVERALL=0&lt;br /&gt;
&lt;br /&gt;
for DIR in `find /proc/ -maxdepth 1 -type d | egrep &amp;quot;^/proc/[0-9]&amp;quot;` ; do&lt;br /&gt;
  PID=`echo $DIR | cut -d / -f 3`&lt;br /&gt;
  PROGNAME=`ps -p $PID -o comm --no-headers`&lt;br /&gt;
  for SWAP in `grep Swap $DIR/smaps 2&amp;gt;/dev/null| awk '{ print $2 }'`; do&lt;br /&gt;
    let SUM=$SUM+$SWAP&lt;br /&gt;
  done&lt;br /&gt;
  echo &amp;quot;PID=$PID - Swap used: ${SUM}K - ($PROGNAME )&amp;quot;&lt;br /&gt;
  let OVERALL=$OVERALL+$SUM&lt;br /&gt;
  SUM=0&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Overall swap used: $OVERALL&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Msartor</name></author>	</entry>

	</feed>