Add start time and uptime to status page - SIDP-365
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 11 Feb 2010 14:38:03 +0000 (14:38 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 11 Feb 2010 14:38:03 +0000 (14:38 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/branches/REL_2@2912 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

doc/RELEASE-NOTES.txt
pom.xml
src/main/java/edu/internet2/middleware/shibboleth/idp/StatusServlet.java

index 30f2515..625bbd5 100644 (file)
@@ -1,5 +1,6 @@
 Changes in Release 2.2.0
 =============================================
+[SIDP-365] - Expose uptime of IdP web application with status handler
 [SIDP-362] - Only log exception message without stack trace for expired SAML messages
 [SIDP-360] - Session isn't being set within the attribute request context during a SAML1 attribute query
 [SIDP-359] - HttpServletHelper.getRelyingPartyConfirmationManager misnamed
diff --git a/pom.xml b/pom.xml
index d8d3bcf..aec6ee4 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
     
     <groupId>edu.internet2.middleware</groupId>
     <artifactId>shibboleth-identityprovider</artifactId>
-    <version>2.1.5</version>
+    <version>2.2.0-SNAPSHOT</version>
     
     <!-- We bundle as a jar here, the installer creates the WAR -->
     <packaging>jar</packaging>
@@ -40,7 +40,7 @@
         <dependency>
             <groupId>edu.internet2.middleware</groupId>
             <artifactId>shibboleth-common</artifactId>
-            <version>1.1.4</version>
+            <version>1.2.0</version>
         </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>
     </profiles>
     
     <!-- Project Metadata -->
-    <url>https://shibboleth.internet2.edu/</url>
+    <url>http://shibboleth.internet2.edu/</url>
     
     <inceptionYear>2006</inceptionYear>
     
index 9b3afe5..21d2b9c 100644 (file)
@@ -29,6 +29,7 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.apache.commons.httpclient.HttpStatus;
 import org.joda.time.DateTime;
+import org.joda.time.Duration;
 import org.joda.time.chrono.ISOChronology;
 import org.joda.time.format.DateTimeFormatter;
 import org.joda.time.format.ISODateTimeFormat;
@@ -141,6 +142,7 @@ public class StatusServlet extends HttpServlet {
      */
     protected void printOperatingEnvironmentInformation(PrintWriter out) {
         Runtime runtime = Runtime.getRuntime();
+        DateTime now = new DateTime(ISOChronology.getInstanceUTC());
 
         out.println("### Operating Environment Information");
         out.println("operating_system: " + System.getProperty("os.name"));
@@ -150,7 +152,9 @@ public class StatusServlet extends HttpServlet {
         out.println("available_cores: " + runtime.availableProcessors());
         out.println("used_memory: " + runtime.totalMemory() / 1048576 + "MB");
         out.println("maximum_memory: " + runtime.maxMemory() / 1048576 + "MB");
-        out.println("current_time: " + new DateTime(ISOChronology.getInstanceUTC()).toString(dateFormat));
+        out.println("start_time: " + startTime.toString(dateFormat));
+        out.println("current_time: " + now.toString(dateFormat));
+        out.println("uptime: " + (now.getMillis() - startTime.getMillis()) + "ms");
     }
 
     /**