From owner-freebsd-questions@FreeBSD.ORG Sun Jan 30 02:08:46 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4D8916A4CE for ; Sun, 30 Jan 2005 02:08:46 +0000 (GMT) Received: from out006.verizon.net (out006pub.verizon.net [206.46.170.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3BBCB43D1F for ; Sun, 30 Jan 2005 02:08:46 +0000 (GMT) (envelope-from reso3w83@verizon.net) Received: from ringworm.mechee.com ([4.26.84.7]) by out006.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20050130020845.CUXE7873.out006.verizon.net@ringworm.mechee.com>; Sat, 29 Jan 2005 20:08:45 -0600 Received: by ringworm.mechee.com (Postfix, from userid 1001) id 3D63C2CE741; Sat, 29 Jan 2005 18:04:54 -0800 (PST) From: "Michael C. Shultz" To: freebsd-questions@freebsd.org Date: Sat, 29 Jan 2005 18:04:53 -0800 User-Agent: KMail/1.7.2 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200501291804.54402.reso3w83@verizon.net> X-Authentication-Info: Submitted using SMTP AUTH at out006.verizon.net from [4.26.84.7] at Sat, 29 Jan 2005 20:08:45 -0600 cc: "Chad Leigh -- Shire.Net LLC" Subject: Re: how to monitor system resources etc X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jan 2005 02:08:46 -0000 On Saturday 29 January 2005 05:59 pm, Chad Leigh -- Shire.Net LLC wrote: > Hi > > I am having a problem with apache/php/mysql or something. One > customers stuff tends to blow the machine up. I would like to be able > to monitor stuff and never remember the tools etc to monitor things. > Process slots, memory, buffers, etc. (I always remember how to look > at mbufs buffers though) or whatever else I can look at and see if we > are hitting a limit. Any pointers to stuff that explains the best > way to track things down would be great. > > This is on 4.9/10 for now. > > Sorry for being so vague. I am not getting anything in > /var/log/messages and the mysql and apache logs don't give a lot. > > Symptoms are lots of httpsd child processes in sbwait and a few in > lockf state. All of a sudden load goes up from <1 or 1-2 range to > over 200 and the swap space starts to rapidly fill (I suspect load is > caused by the excessive swapping). The swapfile is getting up to > about 55% full before it starts to fix itself). (2GB RAM, 4GB swap > --- 2 x 2gb -- dual AMD Athlon MP machine). It will fix itself after > a while and the load will go down as will the swap usage, but mysql > or the php stuff or one of them is still hung up and won't respond. > The apache only handles this site. Other customers have their own > apache installations. > > Apache is 1.3.33+ssl (ben-ssl) > Mysql is now 4.1.9 > php is 5.0.3 > > > Thanks > Chad > I'd start with fstat and see if your customer is leaving too many open files. Here is a good link about fstat: http://www.onlamp.com/pub/a/bsd/2002/09/26/Big_Scary_Daemons.html?page=1 -Mike