Check Swap in/out rate instead of percentagefree?
Wenig, Michael (IT/I4Z)
michael.wenig at ww-informatik.de
Wed Aug 3 12:49:34 CEST 2011
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:noc at fohnet.co.uk]
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)" <michael.wenig at ww-informatik.de> 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
richard at fohnet.co.uk
*******************************************************************************
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.
*******************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110803/3b294894/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
BlackBerry® 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
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
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
More information about the Users
mailing list