<p>My swap was not activated on boot for unknown reason and nagios does not<br>
report this as a problem. Here is an example:</p>

<p>[root@kecom ~]# rpm -q nagios-plugins<br>
nagios-plugins-1.4.13-11.fc10.i386<br>
[root@kecom ~]# /usr/lib/nagios/plugins/check_swap -w 80% -c 40% -c 1 -w 2<br>
SWAP CRITICAL - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0</p>

<p>If there is no swap and users is trying to test percentage of free swap,<br>
consider 0 MB free swap space as problem, or of free/total raises division</p>

<h2>by zero, then set percentage to 0%, not to 100%.</h2>

<p>Just turning attached patch of github issue <a href="https://github.com/nagios-plugins/nagios-plugins/issues/896" class="issue-link" title="check_swap returns OK, if no swap activated [sf#2823005]">#896</a> into a push request.<br>
(Closes <a href="https://github.com/nagios-plugins/nagios-plugins/issues/896" class="issue-link" title="check_swap returns OK, if no swap activated [sf#2823005]">#896</a>)</p>

<hr>

<h4>You can merge this Pull Request by running</h4>
<pre>  git pull https://github.com/waja/nagios-plugins github896</pre>
<p>Or view, comment on, or merge it at:</p>
<p>  <a href='https://github.com/nagios-plugins/nagios-plugins/pull/1193'>https://github.com/nagios-plugins/nagios-plugins/pull/1193</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>check_swap: returns OK, if no swap activated</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/nagios-plugins/nagios-plugins/pull/1193/files#diff-0">THANKS.in</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/nagios-plugins/nagios-plugins/pull/1193/files#diff-1">plugins/check_swap.c</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/nagios-plugins/nagios-plugins/pull/1193.patch'>https://github.com/nagios-plugins/nagios-plugins/pull/1193.patch</a></li>
  <li><a href='https://github.com/nagios-plugins/nagios-plugins/pull/1193.diff'>https://github.com/nagios-plugins/nagios-plugins/pull/1193.diff</a></li>
</ul>