Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 96116 invoked from network); 21 Aug 2007 12:50:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Aug 2007 12:50:06 -0000 Received: (qmail 5362 invoked by uid 500); 21 Aug 2007 12:49:54 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 4964 invoked by uid 500); 21 Aug 2007 12:49:52 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 4953 invoked by uid 99); 21 Aug 2007 12:49:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Aug 2007 05:49:52 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [212.159.14.213] (HELO ptb-relay02.plus.net) (212.159.14.213) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Aug 2007 12:50:24 +0000 Received: from [213.162.107.30] (helo=[192.168.1.37]) by ptb-relay02.plus.net with esmtp (Exim) id 1INTAl-0001c8-Lb; Tue, 21 Aug 2007 13:49:27 +0100 Message-ID: <46CADF57.9090006@jbgb.com> Date: Tue, 21 Aug 2007 13:49:27 +0100 From: Paul Singleton Organization: Jambusters Ltd User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Tomcat Users List CC: jeff@propertykey.com Subject: Re: Does anyone have an approach to checking if Tomcat instance is UP? References: <82f04dc40708200901i603303d9t3bc121a4c48ea3dd@mail.gmail.com> <46C9BC9B.3000600@christopherschultz.net> <46C9C06E.2040506@propertykey.com> In-Reply-To: <46C9C06E.2040506@propertykey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Jeff Hoffmann wrote: > Christopher Schultz wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Dan, >> >> Dan Armbrust wrote: >>> A simple cron job that points to a URL using lynx, and greps the >>> output for what it should see will do the trick... >> >> I would use wget instead of Lynx, but that's just me. >> >> Don't forget that the OP said that his JSPs appear to run correctly even >> after the OOME. > > If what you're concerned about is an OOME, you can have a JSP that > queries the runtime memory usage and outputs something easily parsable > to alert you to a (pending) problem. IE: > > Runtime rt = Runtime.getRuntime(); > double used = rt.totalMemory()-rt.freeMemory(); > double free = rt.freeMemory(); > double available = rt.maxMemory()-rt.totalMemory(); > double usedpercent = (used/rt.maxMemory()) * 100; > double freepercent = (free/rt.maxMemory()) * 100; > double availablepercent = (available/rt.maxMemory()) * 100; Thanks for this - is there a similar (or any) way to anticipate "out of PermGen"? Paul S. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org