public class RequestServerMonitor extends GenericService implements Schedulable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
RequestServerMonitor() |
Modifier and Type | Method and Description |
---|---|
void |
doStartService()
Starts the service.
|
void |
doStopService()
Stops the service.
|
boolean |
getEnabled() |
int |
getErrorActiveHandlerCount() |
int |
getErrorResourcesCheckedOutCount() |
int |
getErrorZombieHandlerCount() |
boolean |
getGcOnSample()
Returns true if a gc should be performed during each sampling
interval, before the memory information is displayed, false
otherwise.
|
Schedule |
getMonitorSchedule()
Returns the Schedule used to check for invalid sessions
|
int |
getMonitorThreadMethod()
Returns the Thread Method for the ServerMonitor's scheduled task.
|
int |
getOverloadedMaxHandlerCount()
Gets the overloadedMaxHandlerCount property.
|
int |
getOverloadedMinHandlerCount()
Gets the overloadedMinHandlerCount property.
|
long |
getOverloadedStopMilliseconds()
Gets the overloadedStopMilliseconds property.
|
RequestServer[] |
getRequestServers()
Gets the list of request server that are being monitored.
|
java.lang.String[] |
getResourcePoolPaths() |
ResourcePool[] |
getResourcePools()
Returns the list of resource pools.
|
Schedule |
getSamplingSchedule()
Returns the Schedule used to sample request/session/memory/JDBC
connection information.
|
Scheduler |
getScheduler()
Returns the Scheduler used to run the expiration and swapping
checks.
|
atg.servlet.sessiontracking.SessionManager |
getSessionManager()
Returns the SessionManager, used to determine the number of
sessions during sampling.
|
long |
getStopHandlingMilliseconds()
Gets the stopHandlingMilliseconds property.
|
int |
getWarnActiveHandlerCount()
Gets the number of active handler threads that when exceeded generate
a warning.
|
long |
getWarnHandlingMilliseconds()
Gets the number of milliseconds for which a handler thread has been
idle that should generate a warning.
|
double |
getWarnMemoryPercentage()
Gets the warnMemoryPercentage property.
|
int |
getWarnZombieHandlerCount()
Gets the number of zombie handler threads that when exceeded generate
a warning.
|
protected void |
performMonitorTask()
Gets called on every monitor poll interval.
|
protected void |
performSamplingTask()
Gets called on every sampling poll interval.
|
void |
performScheduledTask(Scheduler pScheduler,
ScheduledJob pJob)
Called when either a monitor job or a sampling job occurs,
according to the corresponding schedule.
|
void |
setEnabled(boolean pEnabled)
Sets the property Enabled.
|
void |
setErrorActiveHandlerCount(int pErrorActiveHandlerCount)
Sets the property ErrorActiveHandlerCount.
|
void |
setErrorResourcesCheckedOutCount(int pErrorResourcesCheckedOutCount)
Sets the property ErrorResourcesCheckedOutCount.
|
void |
setErrorZombieHandlerCount(int pErrorZombieHandlerCount)
Sets the property ErrorZombieHandlerCount.
|
void |
setGcOnSample(boolean pGcOnSample)
Sets whether a gc should be performed during each sampling
interval, before the memory information is displayed.
|
void |
setMonitorSchedule(Schedule pMonitorSchedule)
Sets the Schedule used to check for invalid sessions
|
void |
setMonitorThreadMethod(int pMonitorThreadMethod)
Sets the Thread Method for the ServerMonitor's scheduled task.
|
void |
setOverloadedMaxHandlerCount(int pCount)
Sets the overloadedMaxHandlerCount property.
|
void |
setOverloadedMinHandlerCount(int pCount)
Sets the overloadedMinHandlerCount property.
|
void |
setOverloadedStopMilliseconds(long pTime)
Sets the overloadedStopMilliseconds property.
|
void |
setRequestServers(RequestServer[] pServers)
Sets the list of request servers that are being monitored
|
void |
setResourcePoolPaths(java.lang.String[] pResourcePoolPaths)
Sets the property ResourcePoolPaths.
|
void |
setResourcePools(ResourcePool[] pResourcePools)
Sets the list of resource pools.
|
void |
setSamplingSchedule(Schedule pSamplingSchedule)
Sets the Schedule used to sample request/session/memory/JDBC
connection information.
|
void |
setScheduler(Scheduler pScheduler)
Sets the Scheduler used to run the expiration and swapping
checks.
|
void |
setSessionManager(atg.servlet.sessiontracking.SessionManager pSessionManager)
Sets the SessionManager, used to determine the number of sessions
during sampling.
|
void |
setStopHandlingMilliseconds(long pTime)
Sets the stopHandlingMilliseconds property.
|
void |
setWarnActiveHandlerCount(int pCount)
Sets the number of active handler threads that when exceeded generate
a warning.
|
void |
setWarnHandlingMilliseconds(long pTime)
Sets the number of milliseconds for which a handler thread has been
idle that should generate a warning.
|
void |
setWarnMemoryPercentage(double pPercentage)
Sets the warnMemoryPercentage property.
|
void |
setWarnZombieHandlerCount(int pCount)
Sets the number of zombie handler threads that when exceeded generate
a warning.
|
addLogListener, createAdminServlet, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public void setRequestServers(RequestServer[] pServers)
public RequestServer[] getRequestServers()
public Scheduler getScheduler()
public void setScheduler(Scheduler pScheduler)
public Schedule getMonitorSchedule()
public void setMonitorSchedule(Schedule pMonitorSchedule)
public int getMonitorThreadMethod()
public void setMonitorThreadMethod(int pMonitorThreadMethod)
public void setWarnActiveHandlerCount(int pCount)
public int getWarnActiveHandlerCount()
public void setErrorActiveHandlerCount(int pErrorActiveHandlerCount)
pErrorActiveHandlerCount
- new value to setpublic int getErrorActiveHandlerCount()
public void setWarnZombieHandlerCount(int pCount)
public int getWarnZombieHandlerCount()
public void setErrorZombieHandlerCount(int pErrorZombieHandlerCount)
pErrorZombieHandlerCount
- new value to setpublic int getErrorZombieHandlerCount()
public void setWarnHandlingMilliseconds(long pTime)
public long getWarnHandlingMilliseconds()
public void setStopHandlingMilliseconds(long pTime)
When a request handling thread has been idle for longer than this time interval, that request handling thread is stopped (using the Thread.stop() method). Note that under some situations, in some VMs, this may not immediately stop the request handling thread. Also note that request handling must be well behaved for the stop to be effective and not corrupt the state of your server. For example, threads should not catch java.lang.ThreadDeath exceptions (or if they do, they must rethrow them). They should also perform any necessary cleanup in finally clauses.
public long getStopHandlingMilliseconds()
public void setOverloadedMaxHandlerCount(int pCount)
If the number of active request handling threads exceeds this maximum, those threads which have been idle for longer than the value of overloadedStopMilliseconds are stopped (using the Thread.stop() method), until overloadedMinHandlerCount is reached. For example, if overloadedMaxHandlerCount=35 and overloadedMinHandlerCount=30, then whenever the number of active threads is 36 or higher, the sufficiently idle threads are stopped until the number of active threads is reduced to 30.
This value must be greater than or equal to overloadedMinHandlerCount.
public int getOverloadedMaxHandlerCount()
public void setOverloadedMinHandlerCount(int pCount)
If the number of active request handling threads exceeds overloadedMaxHandlerCount, those threads which have been idle for longer than the value of overloadedStopMilliseconds are stopped (using the Thread.stop() method), until this minimum value is reached.
If this value is -1 (the default), this feature is disabled.
public int getOverloadedMinHandlerCount()
public void setOverloadedStopMilliseconds(long pTime)
If the number of active request handling threads exceeds overloadedMaxHandlerCount, those threads which have been idle for longer than this value are stopped (using the Thread.stop() method), until overloadedMinHandlerCount is reached.
public long getOverloadedStopMilliseconds()
public void setWarnMemoryPercentage(double pPercentage)
When the free memory falls below the specified percentage of the total memory, a warning will be generated. The percentage should be specified as a number between 0.0 (never warn) and 1.0 (always warn).
public double getWarnMemoryPercentage()
public Schedule getSamplingSchedule()
public void setSamplingSchedule(Schedule pSamplingSchedule)
public void setResourcePoolPaths(java.lang.String[] pResourcePoolPaths)
pResourcePoolPaths
- new value to setpublic java.lang.String[] getResourcePoolPaths()
public void setResourcePools(ResourcePool[] pResourcePools)
public ResourcePool[] getResourcePools()
public void setErrorResourcesCheckedOutCount(int pErrorResourcesCheckedOutCount)
pErrorResourcesCheckedOutCount
- new value to setpublic int getErrorResourcesCheckedOutCount()
public void setSessionManager(atg.servlet.sessiontracking.SessionManager pSessionManager)
public atg.servlet.sessiontracking.SessionManager getSessionManager()
public void setGcOnSample(boolean pGcOnSample)
public boolean getGcOnSample()
public void setEnabled(boolean pEnabled)
public boolean getEnabled()
public void doStartService() throws ServiceException
doStartService
in class GenericService
ServiceException
- if the Service had a problem starting uppublic void doStopService() throws ServiceException
doStopService
in class GenericService
ServiceException
- if the Service had a problem shutting downpublic void performScheduledTask(Scheduler pScheduler, ScheduledJob pJob)
performScheduledTask
in interface Schedulable
pScheduler
- calling the jobpJob
- the ScheduledJobprotected void performMonitorTask()
protected void performSamplingTask()