com.caucho.server.http
Class Statistics

java.lang.Object
  |
  +--com.caucho.server.http.Statistics

public class Statistics
extends java.lang.Object

Simple statistics gathering. The idea is that a cron servlet will check this periodically and mail something to the admin if the load gets too high;


Method Summary
 double getDayCpu()
          Gets the average cpu load for the last day (needs libcaucho.so).
 double getDayThreads()
          Gets the average number of active threads in the last day.
 double getHourCpu()
          Gets the average cpu load for the last hour (needs libcaucho.so).
 double getHourThreads()
          Gets the average number of active threads in the last hour.
 int getLiveSessions()
          Returns the number live sessions.
 double getMinuteCpu()
          Gets the average cpu load for the last minute (needs libcaucho.so)
 double getMinuteThreads()
          Gets the average number of active threads in the last minute.
 long getServerStart()
          Returns the time the server started
 int getSlowThreads()
          Returns the number of 'slow' threads, i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getServerStart

public long getServerStart()
Returns the time the server started

getSlowThreads

public int getSlowThreads()
Returns the number of 'slow' threads, i.e. those threads taking more than 120 seconds to process a request.

getLiveSessions

public int getLiveSessions()
Returns the number live sessions.

getMinuteThreads

public double getMinuteThreads()
Gets the average number of active threads in the last minute.

getHourThreads

public double getHourThreads()
Gets the average number of active threads in the last hour.

getDayThreads

public double getDayThreads()
Gets the average number of active threads in the last day.

getMinuteCpu

public double getMinuteCpu()
Gets the average cpu load for the last minute (needs libcaucho.so)

getHourCpu

public double getHourCpu()
Gets the average cpu load for the last hour (needs libcaucho.so).

getDayCpu

public double getDayCpu()
Gets the average cpu load for the last day (needs libcaucho.so).