<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.21300" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=268414810-03082011><FONT face=Arial
color=#0000ff size=2>Hi Richard,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=268414810-03082011><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=268414810-03082011><FONT face=Arial
color=#0000ff size=2>thanks for this info - I was not aware of that. Indeed
swapiness is set to 60% - I put it on 0% and give it a
try...</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=268414810-03082011><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=268414810-03082011><FONT face=Arial
color=#0000ff size=2>Regards Michael</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> Richard Clark [mailto:noc@fohnet.co.uk]
<BR><B>Gesendet:</B> Dienstag, 2. August 2011 21:37<BR><B>An:</B> Nagios Users
List<BR><B>Betreff:</B> Re: [Nagios-users] Check Swap in/out rate instead of
percentagefree?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><SPAN class=Apple-style-span
style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469)">On
2 Aug 2011, at 15:58, "Wenig, Michael (IT/I4Z)" <<A
href="mailto:michael.wenig@ww-informatik.de">michael.wenig@ww-informatik.de</A>>
wrote:</SPAN><BR></DIV>
<DIV><BR></DIV>
<DIV></DIV>
<BLOCKQUOTE type="cite">
<DIV>
<P><FONT face=Arial size=2>Hi all,</FONT> </P>
<P><FONT face=Arial size=2>We want to know when one of our servers is swapping
as a swapping server is a normally dead server :-)</FONT> </P>
<P><FONT face=Arial size=2>Currently we have the "normal" swap checks which
generates a warning when more than 5% swap are used and a critical when more
than 10% are used. </FONT></P>
<P><FONT face=Arial size=2>This works ok until one time someone needs a little
bit of swap. The swap gets used but never unused (as linux does not remove
something as long it is not needed). So we get warnings and criticals while
just some parts of swap are used but not "active" (in terms of it is actively
read from).</FONT></P>
<P><FONT face=Arial size=2>I think it would be more sufficient to not monitor
how much swap is in use but to check if pages are read from swap in some
period of time. Such as</FONT></P>
<P><FONT face=Arial size=2>warning: if some pages were read out of swap</FONT>
<BR><FONT face=Arial size=2>critical: if in all of the last three
measurement-periods pages were read</FONT> </P>
<P><FONT face=Arial size=2>I can acces the "absolute" swap out-page count by
e.g. </FONT></P>
<P><FONT face=Arial size=2>cat /proc/vmstat | grep pswpout | cut -d " "
-f2</FONT> </P>
<P><FONT face=Arial size=2>which gives me the number of pages swapped out
since the last boot. So I would need to save this to some file and read it
back.</FONT></P>
<P><FONT face=Arial size=2>I searched for a plugin which already does this (or
a similar) kind of check but I did not found anything.</FONT> </P>
<P><FONT face=Arial size=2>So now I am wondering:</FONT> </P>
<P><FONT face=Arial size=2>- did I just miss a plugin</FONT> <BR><FONT
face=Arial size=2>- do I think completely wrong and my opinion is
bullshit?</FONT> </P><BR>
<P><FONT face=Arial size=2>So the questions:</FONT> </P>
<P><FONT face=Arial size=2>- does this kind of check make sense?</FONT>
<BR><FONT face=Arial size=2>- is there any plugin which does this
already?</FONT></P></DIV></BLOCKQUOTE><SPAN class=Apple-style-span
style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469)">
<DIV>Apologies if you're already doing/aware of this:</DIV>Most Linux distros
tend to have a default kernel swappiness setting of between 40-60%. This is fine
for a desktop, but for servers I tend to set this to 0 - basically telling the
kernel to only use swap if it really has to. </SPAN>
<DIV><SPAN class=Apple-style-span
style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469)">another
option (slightly hacky imo) is to periodically empty the swap in times where
free RAM is plentiful by using swapon/swapoff.</SPAN></DIV>
<DIV><SPAN class=Apple-style-span
style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469)"><BR><BR>--
<DIV>Richard Clark</DIV>
<DIV><A
href="mailto:richard@fohnet.co.uk">richard@fohnet.co.uk</A></DIV></SPAN></DIV><font face="monospace">*******************************************************************************<br>
Diese eMail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. <br>
Wenn Sie nicht der richtige Adressat sind oder diese eMail irrtuemlich erhalten<br>
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.<br>
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht<br>
gestattet.<br>
<br>
This email may contain confidential and/or privileged information. <br>
If you are not the intended recipient (or have received this email <br>
in error) please notify the sender immediately and destroy this e-mail. <br>
Any unauthorized copying, disclosure or distribution of the material <br>
in this email is strictly forbidden.<br>
*******************************************************************************</font></BODY></HTML>