Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 99717 invoked from network); 6 Jan 2007 01:30:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jan 2007 01:30:09 -0000 Received: (qmail 97826 invoked by uid 500); 6 Jan 2007 01:30:04 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 97812 invoked by uid 500); 6 Jan 2007 01:30:04 -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 97801 invoked by uid 99); 6 Jan 2007 01:30:04 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jan 2007 17:30:04 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of jacob@rhoden.id.au designates 207.210.242.50 as permitted sender) Received: from [207.210.242.50] (HELO 0o7.org) (207.210.242.50) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jan 2007 17:29:54 -0800 Received: from [10.10.10.32] (c220-237-161-40.lowrp1.vic.optusnet.com.au [220.237.161.40]) by 0o7.org (Postfix) with ESMTP id 16D6C24154 for ; Fri, 5 Jan 2007 20:29:32 -0500 (EST) Message-ID: <459EED6B.1050004@rhoden.id.au> Date: Sat, 06 Jan 2007 11:29:31 +1100 From: Jacob Rhoden User-Agent: Thunderbird 1.5.0.8 (X11/20061115) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: timestamp of tomcat startup? References: <459ED13C.3080508@netcabo.pt> <459EF803.30504@netcabo.pt> In-Reply-To: <459EF803.30504@netcabo.pt> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I think either a LifecycleListener or ServletContextListener is what you want, you can detect tomcat startup/shutdown and/or application startup/shutdown http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/LifecycleListener.html "Let's write a simple application lifecycle event listener that writes a message to the console of the server when the web application is ready to accept requests and when it is going to be removed. Listing 1 shows the code for a simple application event listener class." http://www.onjava.com/pub/a/onjava/2001/04/12/listeners.html?page=2 cifroes wrote: > cifroes wrote: >> Hi, >> >> catalina.out hast the time Tomcat took to startup but I need to know >> the timestamp [date of when tomcat started] of when tomcat is ready >> to receive requests. >> > > Let me clarify a bit: > I need this timestamp to measure downtime of a server, I don't need > exactly precision to the ms but at most 0.5second error margin. > > And the timestamp should be made when tomcat server is ready to > receive requests or at least 0.5second error margin between when > Tomcat is accepting requests and that timestamp. > > I hope it's clear now :) > > Thanks for all the help already, > --cifroes > > --------------------------------------------------------------------- > 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 > --------------------------------------------------------------------- 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