Hi Richard,
 
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...
 
Regards Michael

________________________________

Von: Richard Clark [mailto:[email protected]] 
Gesendet: Dienstag, 2. August 2011 21:37
An: Nagios Users List
Betreff: Re: [Nagios-users] Check Swap in/out rate instead of percentagefree?


On 2 Aug 2011, at 15:58, "Wenig, Michael (IT/I4Z)" 
<[email protected]> wrote:



        Hi all, 

        We want to know when one of our servers is swapping as a swapping 
server is a normally dead server :-) 

        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. 

        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).

        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

        warning: if some pages were read out of swap 
        critical: if in all of the last three measurement-periods pages were 
read 

        I can acces the "absolute" swap out-page count by e.g. 

        cat /proc/vmstat | grep pswpout | cut -d " " -f2 

        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.

        I searched for a plugin which already does this (or a similar) kind of 
check but I did not found anything. 

        So now I am wondering: 

        - did I just miss a plugin 
        - do I think completely wrong and my opinion is bullshit? 


        So the questions: 

        - does this kind of check make sense? 
        - is there any plugin which does this already?

Apologies if you're already doing/aware of this:
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.  
another option (slightly hacky imo) is to periodically empty the swap in times 
where free RAM is plentiful by using swapon/swapoff.


-- 
Richard Clark
[email protected]
*******************************************************************************
Diese eMail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese eMail irrtuemlich erhalten
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht
gestattet.

This email may contain confidential and/or privileged information. 
If you are not the intended recipient (or have received this email 
in error) please notify the sender immediately and destroy this e-mail. 
Any unauthorized copying, disclosure or distribution of the material 
in this email is strictly forbidden.
*******************************************************************************
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Nagios-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to