From owner-freebsd-questions@FreeBSD.ORG Fri Dec 19 18:02:52 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFB731065670 for ; Fri, 19 Dec 2008 18:02:52 +0000 (UTC) (envelope-from freebsd@optiksecurite.com) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id C8CE68FC1F for ; Fri, 19 Dec 2008 18:02:52 +0000 (UTC) (envelope-from freebsd@optiksecurite.com) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from [192.168.10.103] ([74.56.107.65]) by VL-MH-MR001.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTP id <0KC400APHY4LP9O0@VL-MH-MR001.ip.videotron.ca> for freebsd-questions@freebsd.org; Fri, 19 Dec 2008 13:02:45 -0500 (EST) Message-id: <494BE22A.3060301@optiksecurite.com> Date: Fri, 19 Dec 2008 13:04:26 -0500 From: FreeBSD User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) To: Tom Worster References: In-reply-to: Cc: freebsd-questions@freebsd.org Subject: Re: SOLVED: Simple swap question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2008 18:02:53 -0000 Tom Worster a écrit : > On 12/19/08 10:37 AM, "FreeBSD" wrote: > > >> Because this server is monitored by Nagios and it emails me every hour a >> warning because the swap is not 100% free (I know it's pretty extreme, >> but I want to know if the system is swapping). >> > > if a swap space is available and swapping not turned off, it seems > reasonable to expect the OS to use it as it sees fit. > > rather than trying to tinker with the kernel's swapping policy on the fly > every time you get a warning, perhaps think about either telling nagios not > to worry about it or don't use swapping. i'd go with the former. but you say > you want to ensure that swap doesn't get used -- so maybe get rid of the > swap slice? > This server is very lightly used, so most of the time if the swap is getting used it shows that something is going wrong. This warning already proved usefull once, so I don't think I'm going to change it. I don't want to mess with the kernel actions, but there was no reason to keep this in swap. I understand that the kernel can't know that, that's why I wanted to know the way to "reset" the swap. There is always a lot of free or inactive RAM and, in normal condition, the swap should not be used. It's been like that for months, so I think it's a good idea to be notified if the swap is used. Martin