servermonitoring.cfc

CFIDE.adminapi.servermonitoring
Component servermonitoring (Server Monitoring)

Provides APIs for accessing server monitoring information

hierarchy: WEB-INF.cftags.component
CFIDE.adminapi.base
CFIDE.adminapi.servermonitoring
path: {web-root}\CFIDE\adminapi\servermonitoring.cfc
serializable: Yes
properties:
methods: abortCFThread, abortRequest, callGC, canAbortRequests, deleteAlert, deleteAlias, deleteUserSnapshot, disableMemoryMonitoring, disableProfiling, dumpSnapshot, enableMemoryMonitoring, enableProfiling, getActiveCFThreadDetails, getActiveCFThreads, getActiveQueries, getActiveSessionCount, getActiveSessions, getAlertHistory, getAlertSettings, getAlertStatus, getAliasSettings, getAllActiveCFThreads, getAllActiveRequests, getAllActiveSessions, getAllApplicationScopesMemoryUsed, getApplicationScopeMemoryUsed, getAverageResponseTime, getAverageSlowRequestInvocationData, getAverageTopSlowRequests, getCachedQueries, getCauseString, getCFThreadDetails, getCFThreadMemoryUsedDetails, getCFThreadQueueStats, getCurrentReportsSize, getCurrentThrottleStats, getDbPoolStats, getErrorHistory, getHeartBeat, getHitCountStats, getJVMMemoryStats, getLastError, getLoggedInUserCount, getMemoryUtilizationSummary, getMonitorSettings, getMonitorStatus, getObjectCacheMetadata, getQueryCacheStats, getQueryDetails, getRealtimeStats, getRequestDetails, getRequestLoad, getRequestMemoryUsedDetails, getRequestQueueStats, getRequestThrottleStats, getRequestWithErrors, getServerScopeMemoryUsed, getSessionMemoryUsedDetails, getSlowCFThreadInvocationData, getSlowRequestInvocationData, getSnapshotDir, getSystemSnapshotFileNamePrefix, getTemplateCacheMetadata, getTemplateCacheStats, getTimedOutRequests, getTimeOutHistory, getTopAverageSlowQueries, getTopCumulativeServerTimeSpent, getTopFrequentlyRunQueries, getTopHitCounts, getTopMemoryUsedCFThreads,

href=”#method_getTopMemoryUsedQueries”>getTopMemoryUsedQueries
, getTopMemoryUsedRequests, getTopMemoryUsedSessions, getTopSlowCFThreads, getTopSlowQueries, getTopSlowRequests, getUserSnapshotFileNamePrefix, getUserSnapshotList, isMemoryMonitoringEnabled, isProfilingEnabled, resetAverageTopSlowRequests, resetCumulativeServerTimeSpentRequests, resetDbPoolStats, resetErrorStats, resetStats, resetThrottleStats, resetTimedOutStats, resetTopAverageSlowQueries, resetTopFrequentlyRunQueries, resetTopMemoryUsedCFThreads, resetTopMemoryUsedQueries, resetTopMemoryUsedRequests, resetTopMemoryUsedSessions, resetTopSlowCFThreads, resetTopSlowQueries, resetTopSlowRequests, setAlertSettings, setAlias, setMonitorSettings, startMonitoring, stopMonitoring, updateAlias
inherited methods: dump, getEdition, getInstallType, getJRunRootDir, isAdminUser, RDSInvoker, setJrunSN

* – private method

abortCFThread
remote boolean abortCFThread ( required string threadName
)

Aborts the CFThread being handled by the specified java thread. Only the root admin user may invoke this API.
A return value of true indicates that the request aborted successfully. False indicates that
a problem occurred while aborting the request; check monitor.log for details.

Output:
Parameters:
threadName: string, required, threadName

abortRequest
remote boolean abortRequest ( required string threadName
)

Aborts the request being handled by the specified thread. Only the root admin user may invoke this API.
A return value of true indicates that the request aborted successfully. False indicates that
a problem occurred while aborting the request; check monitor.log for details.

Output:
Parameters:
threadName: string, required, threadName

callGC
remote callGC (

)

Calls JVM garbage collection.

Output:

canAbortRequests
remote boolean canAbortRequests (

)

Indicates whether or not the current user can abort requests.

Output:

deleteAlert
remote boolean deleteAlert ( required string alertType, required string alertTime
)

Deletes the specified alert and associated snapshot file

Output:
Parameters:
alertType: string, required, alertType – type of alert
alertTime: string, required, alertTime – Time at which the alert was triggered

deleteAlias
remote deleteAlias ( required string templatePath
)

Deletes specific aliasing setting. Takes following arguement as a struct with the keys:
TEMPLATEPATH — Template path being aliased

Output:
Parameters:
templatePath: string, required, templatePath

deleteUserSnapshot
remote boolean deleteUserSnapshot ( required string snapshotFilePath
)

Deletes the specified user snapshot

Output:
Parameters:
snapshotFilePath: string, required, snapshotFilePath – absolute path to the snapshot file

disableMemoryMonitoring
remote disableMemoryMonitoring (

)

Disables monitoring of memory usage

Output:

disableProfiling
remote disableProfiling (

)

Disables profiling

Output:

dumpSnapshot
remote string dumpSnapshot (

)

Dumps the snapshot in monitoring file @

/logs/snapshot_usrgen_[timestamp].txt, and returns the snapshot file name. The snapshot file will show differing amounts of data depending on whether monitoring, memory monitoring and profiling flags are on or off.

Output:

enableMemoryMonitoring
remote enableMemoryMonitoring (

)

Enables monitoring of memory usage

Output:

enableProfiling
remote enableProfiling (

)

Enables profiling

Output:

getActiveCFThreadDetails
remote struct getActiveCFThreadDetails ( required string javathreadname
)

Returns details for CF thread being handled by the specified java thread. Result is returned as a struct with the following keys:
CFTHREADNAME — name of the cf thread.
SPAWNEDFROM — template Path from which the thread was spawned.
REQUESTTEMPLATE — template path for which the original request came.
LINENO — line no at which the cfthread was spawned
THREADNAME — Name of the java thread.
TIMETAKEN — Time taken
CFSTACKTRACE — Array of stack frame strings
JAVASTACKTRACE — Array of stack frame strings, available only on JRE 1.5 or higher
Monitoring must be turned on for this function to work. If a request has been excluded by the monitoring
filter, it will not show up on this list.

Output:
Parameters:
javathreadname: string, required, javathreadname – name of the java thread handling the cfthread

getActiveCFThreads
remote array getActiveCFThreads ( required string requestthreadname
)

Returns all active CF thread for a request thread as an array of structs with the following keys:
CFTHREADNAME — name of the cf thread.
SPAWNEDFROM — template Path from which the thread was spawned.
REQUESTTEMPLATE — template path for which the original request came.
LINENO — line no at which the cfthread was spawned
THREADNAME — Name of the java thread.
TIMETAKEN — Time taken
CFSTACKTRACE — Array of stack frame strings
JAVASTACKTRACE — Array of stack frame strings, available only on JRE 1.5 or higher
Monitoring must be turned on for this function to work. If a request has been excluded by the monitoring
filter, it will not show up on this list.

Output:
Parameters:
requestthreadname: string, required, requestthreadname – name of the java thread handling the request

getActiveQueries
remote array getActiveQueries (

)

Returns the list of active queries as an array of structs with the following keys:
TIMEEXECUTED — The time at which query execution began
AVGTIME — The average time taken for the query to execute in milliseconds
MINTIME — The minimum time taken for the query to execute in milliseconds
MAXTIME — The maximum time taken for the query to execute in milliseconds
TIMETAKEN — The time taken for the query to execute upto this call in milliseconds
AVGSIZE — The average size of the query in bytes
MINSIZE — The minimum size of the query in bytes
MAXSIZE — The maximum size of the query in bytes
ISCACHED — Boolean, indicates whether or not the query is cached
QUERYNAME — The query name
DSN — The datasource name
SQL — The SQL for the query
TEMPLATEPATH — The path to the template on which the query is declared
LINENUMBER — The line number on which the query is declared
FUNCTIONNAME — The function within which the query is declared, if any
THREADNAME — The name of the thread executing the query.
EXECUTIONCOUNT — The number of times the query has been executed
Monitoring and profiling must be turned on for this function to work.
Stats providing details of memory consumed will have values only if memory monitoring is turned on.

Output:

getActiveSessionCount
remote numeric getActiveSessionCount ( string cfapplicationname
)

Returns the number of current sessions on the server

Output:
Parameters:
cfapplicationname: string, optional, cfapplicationname

getActiveSessions
remote array getActiveSessions ( string cfapplicationname
)

Returns details of all active sessions, associated with an application,as an array of structs with the following keys:
CFSESSIONID — The session ID assigned by CF
CLIENTIPADDRESS — Client’s IP Address
SESSIONID — The ID of the underlying session. This will be different from the CFSESSIONID under a J2EE deployment, as it will indicate the ID of the underlying HTTP session.
SESSIONSIZE — The size of the session in bytes
APPNAME — The name application for which the session was created, as specified on the CFAPPLICATION tag.
ELAPSEDTIME — The time for which the session has been alive, in milliseconds.
TIMESINCELASTACCESS — The time that has elapsed since the last access to the session in milliseconds.
MAXINACTIVEINTERVAL — The amount of time that the session will be kept alive when it is inactive, in milliseconds.
Monitoring and memory monitoring must be turned on to get a valid value for the SESSIONSIZE attribute.

Output:
Parameters:
cfapplicationname: string, optional, cfapplicationname

getAlertHistory
remote array getAlertHistory (

)

Returns array of structs with information about all alerts occured from the time server restarted

Returns history for all alerts triggered as a array of structs with the following keys:
ALERTTYPE — The name of the alert
ALERTSTATE — State of Alert (ACTIVE, RECOVERED,INVALIDATED)
OCCUREDAT — The time at which the alert reached ALERTSTATE
ALERTMESSAGE — The Detail message associated with the alert.
ALERTSNAPSHOTFILE — The full path to the snapshot file that was dumped the last time the alert occurred, if any.

Output:

getAlertSettings
remote struct getAlertSettings ( required string alertType
)

Returns alert settings for the specified alert type

SLOWSERVERALERT
RESPONSETIMETHRESHOLD — Number, Threshold of average server response time at
which the alert should be issued in milliseconds.
DUMPSNAPSHOT — Boolean, indicates whether a snapshot should be dumped or not.
ENABLED — Boolean, indicates whether or not this alert is enabled
NOTIFYONALERT — Boolean, indicates if an email should be sent to the user.
NOTIFYCLIENTONALERT – Boolean, indicates if Server Manager client has to be notified of the alert.
KILLTHREADENABLED — Boolean, indicates if automatic killing of threads should be done.
KILLTHREADTHRESHOLD — Number, specifies time (in milliseconds) for which a thread
should be running if it is to be killed automatically.
REJECTREQUESTSENABLED — Boolean, indicates if any new requests should be rejected if this alert is active
ALERT_PROCESSING_CFC — The CFC to invoke when this alert occurs

UNRESPONSIVESERVERALERT
HUNGTHREADCOUNT — The number of threads which must be busy for this alert to be issued.
BUSYTIMETHRESHOLD — The time in milliseconds for which a thread must be working to be deemed busy.
DUMPSNAPSHOT — Boolean, indicates whether a snapshot should be dumped or not.
ENABLED — Boolean, indicates whether or not this alert is enabled
NOTIFYONALERT — Boolean, indicates if an email should be sent to the user.
NOTIFYCLIENTONALERT – Boolean, indicates if Server Manager client has to be notified of the alert.
KILLTHREADENABLED — Boolean, indicates if automatic killing of threads should be done.
KILLTHREADTHRESHOLD — Number, specifies time (in milliseconds) for which a thread
should be running if it is to be killed automatically.
REJECTREQUESTSENABLED — Boolean, indicates if any new requests should be rejected if this alert is active
ALERT_PROCESSING_CFC — The CFC to invoke when this alert occurs

JVMMEMORYALERT
JVMMEMORYTHRESHOLD — Number, specifies the threshold (in MB) for JVM memory allocation
on the server. If the total JVM memory allocation becomes more than this, the alert will become active.
GARBAGECOLLECTIONENABLED — Boolean, indicates whether ColdFusion server should ask the JVM to do garbage collection when this alert is active.
DUMPSNAPSHOT — Boolean, indicates whether a snapshot should be dumped or not.
ENABLED — Boolean, indicates whether or not this alert is enabled
NOTIFYONALERT — Boolean, indicates if an email should be sent to the user.
NOTIFYCLIENTONALERT – Boolean, indicates if Server Manager client has to be notified of the alert.
KILLTHREADENABLED — Boolean, indicates if automatic killing of threads should be done.
KILLTHREADTHRESHOLD — Number, specifies time (in milliseconds) for which a thread
should be running if it is to be killed automatically.
REJECTREQUESTSENABLED — Boolean, indicates if any new requests should be rejected if this alert is active
ALERT_PROCESSING_CFC — The CFC to invoke when this alert occurs

TIMEOUTSALERT
TIMEOUTSCOUNT — Number, specifies the number of requests that should timeout within the specified interval (see below) for this alert to become active.
TIMEOUTSINTERVAL — Number, specifies the time interval (in milliseconds) which is used to count the timeouts (see above)
DUMPSNAPSHOT — Boolean, indicates whether a snapshot should be dumped or not.
ENABLED — Boolean, indicates whether or not this alert is enabled
NOTIFYONALERT — Boolean, indicates if an email should be sent to the user.
NOTIFYCLIENTONALERT – Boolean, indicates if Server Manager client has to be notified of the alert.
KILLTHREADENABLED — Boolean, indicates if automatic killing of threads should be done.
KILLTHREADTHRESHOLD — Number, specifies time (in milliseconds) for which a thread
should be running if it is to be killed automatically.
REJECTREQUESTSENABLED — Boolean, indicates if any new requests should be rejected if this alert is active
ALERT_PROCESSING_CFC — The CFC to invoke when this alert occurs

Output:
Parameters:
alertType: string, required, alertType

getAlertStatus
remote array getAlertStatus ( boolean getActiveAlerts="false"
)

Returns status information for all alerts as a list of structs with the following keys:
ALERTTYPE — The name of the alert
ALERTISACTIVE — Boolean flag indicating whether or not the server is currently in an alerted state for the alert
ALERTINVALIDATEDAT — The time at which the active alert was invalidated (by changed settings)
ALERTACTIVEAT — The time at which the alert became active, if any. If the alert is not active,
this will indicate the time at which the alert was last active.
ALERTRECOVEREDAT — The time at which the server recovered from the alert state, if any.
ALERTMESSAGE — The Detail message associated with the alert.
ALERTSNAPSHOTFILE — The full path to the snapshot file that was dumped the last time the alert occurred, if any.

Output:
Parameters:
getActiveAlerts: boolean, optional, getActiveAlerts – if true returns only the status of currently active alerts

getAliasSettings
remote array getAliasSettings (

)

Returns the server monitoring aliasing settings as an array of struct with the following keys:
TEMPLATEPATH — Template path to be alliased
ALIASNAME — Unique alias name for templatepath
PARAMETERS — Different parameters to be monitored as a comma seperated list

Output:

getAllActiveCFThreads
remote array getAllActiveCFThreads (

)

Returns all active CF thread as an array of structs with the following keys:
CFTHREADNAME — name of the cf thread.
SPAWNEDFROM — template Path from which the thread was spawned.
REQUESTTEMPLATE — template path for which the original request came.
LINENO — line no at which the cfthread was spawned
THREADNAME — Name of the java thread.
TIMETAKEN — Time taken
CFSTACKTRACE — Array of stack frame strings
JAVASTACKTRACE — Array of stack frame strings, available only on JRE 1.5 or higher
Monitoring must be turned on for this function to work. If a request has been excluded by the monitoring
filter, it will not show up on this list.

Output:

getAllActiveRequests
remote array getAllActiveRequests (

)

Returns all active request as an array of structs with the following keys:
THREADNAME — thread01
CLIENTIPADDRESS — 10.29.36.234
TEMPLATEPATH –/store/getProduct.cfm
FUNCTIONNAME– getUserInfo() (Only if the TEMPLATEPATH points to a CFC)
TIMETAKEN — name
CFSTACKTRACE — Array of stack frame strings
JAVASTACKTRACE — Array of stack frame strings, available only on JRE 1.5 or higher
REQTYPE – Type of the request. returns one of type Template Request,Event Gatway Request,Flash Remoting Request, Web Service Request, or CFC GET Request
REQUESTMEMORY — The amount of memory allocated over the course of request in bytes
VARIABLELIST (A struct with scopes as key against list of variables in that scope)
SCOPE — Different scopes
SCOPEVARIABLES (A list of struct with following keys)
SIZE — Size of the variable
VARIABLENAME — Name of the variable
VARIABLEVALUE — value stored in the variable (for simple ones) or the variable type (for rest)
Monitoring must be turned on for this function to work. If a request has been excluded by the monitoring
filter, it will not show up on this list.

Output:

getAllActiveSessions
remote array getAllActiveSessions (

)

Returns details of all active sessions as an array of structs with the following keys:
CFSESSIONID — The session ID assigned by CF
CLIENTIPADDRESS — Client’s IP Address
SESSIONID — The ID of the underlying session. This will be different from the CFSESSIONID under a J2EE deployment, as it will indicate the ID of the underlying HTTP session.
SESSIONSIZE — The size of the session in bytes
APPNAME — The name application for which the session was created, as specified on the CFAPPLICATION tag.
ELAPSEDTIME — The time for which the session has been alive, in milliseconds.
TIMESINCELASTACCESS — The time that has elapsed since the last access to the session in milliseconds.
MAXINACTIVEINTERVAL — The amount of time that the session will be kept alive when it is inactive, in milliseconds.
Monitoring and memory monitoring must be turned on to get a valid value for the SESSIONSIZE attribute.

Output:

getAllApplicationScopesMemoryUsed
remote struct getAllApplicationScopesMemoryUsed (

)

Returns details of how memory is used in all the application scopes

Output:

getApplicationScopeMemoryUsed
remote array getApplicationScopeMemoryUsed ( required string applicationName
)

Returns details of how memory is used in the specified application scope as an arrays of structs with the following keys:
VARIABLENAME — The name of the request variable
VARIABLETYPE — The type of the variable
SIZE — The memory occupied by the variable in bytes
Monitoring and memory monitoring must be turned on to get the SIZE attribute.

Output:
Parameters:
applicationName: string, required, applicationName

getAverageResponseTime
remote numeric getAverageResponseTime (

)

Returns average response time for the server

Output:

getAverageSlowRequestInvocationData
remote array getAverageSlowRequestInvocationData ( required string templatepath, string functionname=""
)

Returns slow invocation data for the specified template path as an array of structs, each of which has the following keys.
Data is returned only for the top slow tags/functions.
TAGNAME — name of the tag
FUNCTIONNAME — name of the function (optional)
TEMPLATEPATH — The path to the template on which the function or tag was invoked.
LINENO — The line no at which the tag or function was invoked.
CFSTACKTRACE — Array of stack frame strings showing the CF stack to the invocation of the tag/function.
AVGTIME — The average execution time for the tag/function.
MAXTIME — The maximum execution time for the tag/function.
MINTIME — The minimum execution time for the tag/function.
Monitoring and profiling must be turned on for this function to work.

Output:
Parameters:
templatepath: string, required, templatepath – The template path for which to return request invocation data
functionname: string, optional, functionname – The function invoked, if the template path points to a CFC

getAverageTopSlowRequests
remote array getAverageTopSlowRequests (

)

Returns the top slow requests averaged over execution count as an array of structs. Each struct has the following keys:
TEMPLATEPATH — Full path to the template that was executed
FUNCTIONNAME– The name of the function that was invoked, if this was a web service, flash remoting, remote CFC or gateway request.
LASTRESPONSETIME — The time taken for the request to complete at the last invocation in milliseconds
LASTTIMEEXECUTED — The date/time at which the template/function was last invoked.
AVGTIME — The average response time for the template/function in milliseconds
MINTIME — The min response time for the template/function in milliseconds
MAXTIME — The max response time for the template/function in milliseconds
AVGREQUESTSIZE — The average amount of memory allocated over the course of the request in bytes
MAXREQUESTSIZE — The max amount of memory allocated over the course of the request in bytes
MINREQUESTSIZE — The min amount of memory allocated over the course of the request in bytes
LASTREQUESTSIZE — The amount of memory allocated over the course of the request at the last invocation in bytes
Monitoring must be turned on for this function to work. Stats providing details of memory consumed will have values only if memory monitoring is turned on.

Output:

getCachedQueries
remote array getCachedQueries (

)

Returns details of all cached queries as a struct with the following keys:
LASTTIMEEXECUTED — The time at which the query was executed
SIZE — The size of the query in bytes
EXECUTIONTIME — The time taken for the query to execute
QUERYNAME — The name of the query
DSN — The datasource name
SQL — The SQL for the query
TEMPLATEPATH — The path to the template on which the query was issued
TIMETAKEN –The time taken for the query to execute upto this call in milliseconds
LINENUMBER — The line number on the template where the query was issued
FUNCTIONNAME — The name of the function in which the query was issued, if any
EXECUTIONCOUNT — The number of times the query has been executed
Monitoring, memory monitoring and profiling must be turned on for this function to work.
If memory monitoring is enabled at some point after the cache has been populated, only the SIZE attribute will have a valid value.

Output:

getCauseString
public string getCauseString (

)

Returns the text for the cause when user initiates the snapshot

Output:

getCFThreadDetails
remote array getCFThreadDetails ( string templatePath="", numeric lineNo="0"
)

Returns details for the specified template and lineNo combination, or
for all threads (if no templatePath is specified), or for all threads spawned from a templates (if lineNo is not specified) as a list of structs with the following keys:
SPAWNEDFROM — Full path to the template that spawned the thread
LINENO — Line no in the template at which this thread was spawned
LASTRESPONSETIME — The time taken for the thread to complete at the last invocation in milliseconds
LASTTIMEEXECUTED — The date/time at which the thread was last invoked.
LASTREQUESTSIZE — The amount of memory allocated over the course of the request at the last invocation in bytes
AVGTIME — The average response time for the thread in milliseconds
MINTIME — The min response time for the thread in milliseconds
MAXTIME — The max response time for the thread in milliseconds
AVGREQUESTSIZE — The average amount of memory allocated over the course of the CF thread in bytes
MAXREQUESTSIZE — The max amount of memory allocated over the course of the CF Thread in bytes
MINREQUESTSIZE — The min amount of memory allocated over the course of the CF Thread in bytes
Monitoring must be turned on for this function to work. Stats providing details of memory consumed
will have values only if memory monitoring is turned on.

Output:
Parameters:
templatePath: string, optional, templatePath
lineNo: numeric, optional, lineNo

getCFThreadMemoryUsedDetails
remote array getCFThreadMemoryUsedDetails ( required string templatepath, required lineNo
)

Returns the 10 largest variables allocated inside thread execution for the specified cfthread as an array of structs with the following keys:
VARIABLENAME — The name of the request variable
VARIABLETYPE — The type of the variable
VARIABLESCOPE — The scope in which the variable was declared, may be LOCAL (function local scope), PAGE (page scope) or REQUEST (request scope).
TEMPLATEPATH — Path to the template on which the template was declared.
FUNCTIONNAME — The name of the function in which the variable was declared, if any.
AVGSIZE — The average memory occupied by the variable in bytes
LASTSIZE — The size of the variable on the last request
Monitoring, memory monitoring and profiling must be turned on for this function to work.
This information will be available only for requests in the top memory used requests list.

Output:
Parameters:
templatepath: string, required, templatepath – The template path from which the thread was spawned
lineNo: any, required, lineNo

getCFThreadQueueStats
remote struct getCFThreadQueueStats (

)

Returns the thread queue stats as struct with these keys
CFTHREADSQUEUED — the total number of CF threads queued
CFTHREADSRUNNING — the total number of CF threads running

Output:

getCurrentReportsSize
remote struct getCurrentReportsSize (

)

Returns the size of the current monitor reports

Returns all active request as an array of structs with the following keys:
TOPMEMORYUSEDREQUESTCNT — The size of the requests by memory utilitization report
TOPSLOWREQUESTCNT — The size of the slow requests report
TOPHITCOUNTREQUESTCNT — The size of the top hit count requests report
REQUESTCNTWITHERRORS — The size of the requests with errors report
TIMEDOUTREQUESTCNT — The size of the timed out requests report
TOPMEMORYUSEDSESSIONCNT — The size of the sessions by memory utilization report
TOPAVERAGESLOWQUERYCNT — The size of the average slow queries report
TOPMEMORYUSEDQUERYCNT — The size of the queries by memory utilization report
TOPSLOWQUERYCNT — The size of the slow queries report
TOPFREQUENTLYRUNQUERYCNT — The size of the most frequently run queries report
JVMFREEMEMORY –The free memory in the JVM in bytes
JVMUSEDMEMORY — The used memory in the JVM in bytes
Monitoring must be turned on for this function to work.

Output:

getCurrentThrottleStats
remote struct getCurrentThrottleStats (

)

Returns throttle statistics as a struct with the following keys:
THROTTLEQUEUESIZE — The number of requests queued in the request throttle.
TOTALTHROTTLEMEMORYUSED — The amount of memory used by the throttle in bytes.
Monitoring must be turned on for this function to work.

Output:

getDbPoolStats
remote array getDbPoolStats (

)

Returns statistics for all the DB pools as an array of structs with the following keys:
DSN — The datasource name
OPENCONNECTIONCOUNT — The number of open connections
TOTALCONNECTIONCOUNT — The total number of connections currently in the pool (= open + available)
MAXCONNECTIONCOUNT — The max number of connections that the pool may hold, -1 if configured to be unlimited
AVGTOTALCONNECTIONCOUNT — The average number of total connections in the pool since the last reset
AVGOPENCONNECTIONCOUNT — The average number of open connections since the last reset
Note that this API will not work for J2EE datasource pools. Please use monitoring tools provided
by your J2EE application server to get this information.

Output:

getErrorHistory
remote array getErrorHistory ( required string templatepath, string functionname=""
)

Returns details of the last ten errors for the specified request as an array of structs with the following keys:
ERRORAT — The date/time at which the error occurred.
ERROR — The error message
CFSTACKTRACE — Array of stack frame strings
JAVASTACKTRACE — Array of java exception stack frame strings
Monitoring must be turned on for this function to work.

Output:
Parameters:
templatepath: string, required, templatepath – The template path for which to return request error history
functionname: string, optional, functionname – The function invoked, if the template path points to a CFC

getHeartBeat
remote struct getHeartBeat (

)

Returns a snapshot of vital statistics for monitoring health of the server.
The statistics are returned in a struct which has the following fields:
ACTIVEALERT (Details of all Alert from the time server got restarted)
ALERTACTIVEAT — Time at which the alert got activated
ALERTINVALIDATEDAT — Time at which the alert was invalidated (by changing alert settings)
ALERTISACTIVE — returns yes if alert is active
ALERTMESSAGE — Alert message that gets logged (gives a brief info about current alert settings)
ALERTRECOVEREDAT — Time at which the alert gets recovered
ALERTSNAPSHOTFILE — Snapshot file path (if a snapshot was generated)
ALERTTYPE — Type of alert (jvmmemoryalert, slowserveralert, unresponsiveserveralert, timeoutsalert)
ALERT_STATUSFLAGS — Returns status of alert (if its active (2: threshold is reached) or warned (1: in between 80 to 100% of threshold)
or not active (0: less than 80% of threshold))
JVMMEMORYALERT — jvm memory alert status
SLOWSERVERALERT — slow server alert status
TIMEOUTSALERT — times out alert status
UNRESPONSIVESERVERALERT — unresponsive server alert status
ALLREQERRORCOUNT — Number of requests with errors
AVGTIME — Average response time in milliseconds
FREEMEMORY — The free memory in the JVM in bytes
REQPERSEC — Number of requests handled by the server per second
REQQUEUED — Number of request queued
REQRUNNING — Number of request running
REQTIMEDOUT — Number of timed out requests
SERVERUPTIME — Server’s start time
USEDMEMORY — The used memory in the JVM in bytes

Output:

getHitCountStats
remote struct getHitCountStats (

)

Returns a struct of the hit counts for each type of requests with the following keys:
TEMPLATEHITCOUNT– No of hits via regular HTTP template requests
GATEWAYHITCOUNT — No of hits via gateways
FLASHHITCOUNT — No of hits via Flash remoting
RCFCHITCOUNT — No of hits via HTTP calls to CFC functions
WSHITCOUNT — No of hits via web services
TOTALHITCOUNT — The total hit count
Monitoring must be turned on for this function to work.

Output:

getJVMMemoryStats
remote struct getJVMMemoryStats (

)

Returns JVM Memory stats with the following keys:
FREEMEMORY — The free memory in the JVM in bytes.
USEDMEMORY — The used memory in the JVM in bytes.

Output:

getLastError
remote struct getLastError (

)

Returns the details of the last error occurred on the server:
TEMPLATEPATH — Full path to the template that was executed
FUNCTIONNAME– The name of the function that was invoked, if this was a web service, flash remoting, remote CFC or gateway request.
LASTERRORAT — The date/time at which the last error occurred.
LASTERROR — The last error message
Monitoring must be turned on for this function to work.

Output:

getLoggedInUserCount
remote numeric getLoggedInUserCount (

)

Returns the number of concurrent users logged in via CFLOGINUSER

Output:

getMemoryUtilizationSummary
remote struct getMemoryUtilizationSummary (

)

Returns a summary of memory utilization across the different scopes as a struct with the following keys:
SERVERSCOPESIZE — The size of the server scope in bytes
APPLICATIONSCOPESSIZE — The sum of the sizes of all application scopes in bytes
SESSIONSCOPESSIZE — The sum of the sizes of all sessions in bytes
Monitoring and memory monitoring must be turned on for this function to work properly.

Output:

getMonitorSettings
remote struct getMonitorSettings (

)

Returns the server monitoring settings as a struct with the following keys:
MONITORINGENABLED — Boolean, indicates whether or not monitoring is enabled
MEMORYMONITORINGENABLED — Boolean, indicates whether or not memory tracking is enabled
PROFILINGENABLED — Boolean, indicates whether or not profiling is enabled
INCLUDECFADMIN — Indicates whether or not to include CFCs and CFMs under /CFIDE for monitoring
SLOWREQUESTTHRESHOLD — Slow request report threshold in seconds
SLOWREQUESTCOUNT — Size of slow request report
TOPMEMORYUSEDREQUESTSCOUNT — Top memory used requests report size
TOPMEMORYUSEDREQUESTSTHRESHOLD — Top memory used requests report threshold in KB
INCLUDEMONITORTEMPLATEPATHS — Template paths to monitor, separated by commas
EXCLUDEMONITORTEMPLATEPATHS — Template paths to exclude from monitoring, separated by commas
TOPMEMORYUSEDSESSIONSTHRESHOLD — Top memory used sessions report threshold in KB
TOPMEMORYUSEDSESSIONSCOUNT — Top memory used sessions report size
MAXSERVERTIMEREQUESTCOUNT — The size of the cumulative server time report
HITCOUNTCOUNT — The size of the top hit count report
REQUESTLOADAVGPERIOD — The period at which to sample the request load
TOPMEMORYUSEDQUERIESTHRESHOLD — Top memory used queries report threshold in KB
TOPMEMORYUSEDQUERIESCOUNT — Size of top memory used queries report
TOPSLOWQUERIESTHRESHOLD — Top slow queries report threshold in seconds
TOPSLOWQUERIESCOUNT — Size of top slow queries report
TOPAVERAGESLOWQUERIESTHRESHOLD — Top average slow queries report threshold in seconds
TOPAVERAGESLOWQUERIESCOUNT — Size of top average slow queries report
NOTIFYALERTEMAILID — The email id to send alert notifications to
MAILSERVERUSERID — The user id with which to connect to the mail server for sending alert notifications.
MAILSERVERPASSWORD — The password for the user id specified above.
TOPMEMORYUSEDTHREADSCOUNT — Size of CF threads by memory usage report
TOPMEMORYUSEDTHREADSTHREASHOLD — CF threads by memory usage report threshold in KB
INCLUDEPROFILINGTEMPLATEPATHS — Template paths to profile, separated by commas
EXCLUDEPROFILINGTEMPLATEPATHS — Template paths to exclude from profiling, separated by commas
AVGSLOWREQUESTCOUNT — Size of slowest requests by average report
AVGSLOWREQUESTTHRESHOLD — Slowest request by average threshold in seconds
HITTHREADCOUNT — Size of highest hit counts report
MAXSERVERTIMETHREADCOUNT — Size of cummulative server usage report
SLOWTHREADTHRESHOLD — Slowest ColdFusion threads report threshold in seconds
SLOWTHREADCOUNT — Size of slowest ColdFusion threads report
TOPFREQUENTLYRUNQUERIESCOUNT — Size of frequently run queries report

Output:

getMonitorStatus
remote struct getMonitorStatus (

)

Returns a struct containing data about the monitoring service status, with the following keys:
ISENABLED — Boolean, indicates whether or not the monitoring service is running
ISMEMORYMONITORINGENABLED — Boolean, indicates whether or not monitoring of memory utilization is enabled.
ISPROFILINGENABLED — Boolean, indicates whether or not profiling is enabled.
STATECHANGEDAT — Time at which the monitoring service was last started/stopped
CURRENTSERVERTIME — Current time on the server
SERVERSTARTTIME — The time at which the server was started
SERVERIPADDRESS — The IP address of the server

Output:

getObjectCacheMetadata
remote array getObjectCacheMetadata (

)

Returns an array of structs with object cache metadata for the server grouped by applicaton
APPLICATIONNAME — the name of the application
CACHESIZE — total cache size (required for serialization) for the application
HITRATIO — total hitcount/ total misscount
NUMBER — total number of objects in cache
OBJECTS — An array of struct with per object metadata
ID — ID of the cached object
SIZE — cache size (required for serialization) for the object
HITCOUNT — hit count for that cahced object

Output:

getQueryCacheStats
remote struct getQueryCacheStats (

)

Returns statistics for the query cache as a struct with the following keys:
HITRATIO — The query cache hit ratio (hits/(hits+misses))
SIZE — The size of the cache in bytes
COUNT — The number of queries in the cache
This function will work even with monitoring turned off. However, monitoring and memory monitoring must be turned on to get a valid value for the SIZE attribute.

Output:

getQueryDetails
remote array getQueryDetails ( templatePath="", functionName="", lineNo="-1"
)

Returns details of all queries on the specified template. If no template is specified,
details for all queries that have been executed are returned. If a function is specified, then
only queries defined in that function are returned. If a line no is specified, then only
the query defined at that line no is returned. Details are returned as an array of structs
with the following keys:
LASTTIMEEXECUTED– The time at which the query was last executed
AVGTIME– The average time taken for the query to execute in milliseconds
MINTIME– The minimum time taken for the query to execute in milliseconds
MAXTIME– The maximum time taken for the query to execute in milliseconds
LASTRESPONSETIME– The time taken to execute the last invocation of the query
AVGSIZE– The average size of the query in bytes
MINSIZE– The minimum size of the query in bytes
MAXSIZE– The maximum size of the query in bytes
LASTSIZE– The last size of the query in bytes
ISCACHED– Boolean, indicates whether or not the query is cached
QUERYNAME– The query name
DSN — The datasource name
TEMPLATEPATH– The path to the template on which the query is declared
LINENUMBER– The line number on which the query is declared
FUNCTIONNAME– The function within which the query is declared, if any
EXECUTIONCOUNT — The number of times the query has been executed
Monitoring and profiling must be turned on for this function to work.
Stats providing details of memory consumed will have values only if memory monitoring is turned on.

Output:
Parameters:
templatePath: any, optional, templatePath – The path to the template on which the query is defined
functionName: any, optional, functionName – The function withing which the query occurs
lineNo: any, optional, lineNo – The line no at which the query is defined

getRealtimeStats
remote struct getRealtimeStats (

)

Returns a struct of various realtime statistics

Returns a summary of statistics as a struct with the following keys:
ACTIVESESSIONCOUNT — Returns the number of current sessions on the server
APPLICATIONSCOPESSIZE — The size of the application scope in bytes
AVGRESPONSETIME — Returns average response time for the server
CACHEDQUERYCOUNT — The number of queries in the cache
CFCREQQUEUED — CFC requests (via HTTP) that timed out waiting to run
CFCREQRUNNING — CFC requests (via HTTP) running
CFCREQTIMEDOUT — CFC requests (via HTTP) that timed out waiting to run
CFTHREADQUEUED — the total number of CF threads queued
CFTHREADRUNNING — the total number of CF threads running
CONCURRENTUSERCOUNT — Returns the number of users logged in via the CFLOGIN tag
FLASHREMOTINGREQQUEUED — Flash remoting requests waiting to run
FLASHREMOTINGREQRUNNING — Flash remoting requests running
FLASHREMOTINGREQTIMEDOUT — Flash remoting requests that timed out waiting to run
JVMFREEMEMORY –The free memory in the JVM in bytes
JVMUSEDMEMORY — The used memory in the JVM in bytes
QUERYCACHEHITRATIO — The query cache hit ratio (hits/(hits+misses))
QUERYCACHESIZE — The size of the cache in bytes
REQQUEUED — on JRun, the total number of request threads running
REQRUNNING — on JRun, the total number of request threads queued
REQTIMEDOUT — on JRun, the total number of request timeouts
REQUESTLOAD — Returns the request load for the server in requests/sec
SERVERSCOPESIZE — The size of the server scope in bytes
SERVERTIME — Current time on the server
SESSIONSCOPESSIZE — The size of the session scope in bytes
TEMPLATECACHECOUNT — The number of templates in the template cache
TEMPLATECACHEHITRATIO — The hit ratio for the template cache
TEMPLATECACHESIZE — The size of the template cache in bytes
TEMPLATEREQQUEUED — template requests waiting to run
TEMPLATEREQRUNNING — template requests running
TEMPLATEREQTIMEDOUT — template requests that timed out waiting to run
THROTTLEQUEUESIZE — The number of requests queued in the request throttle
TOTALTHROTTLEMEMORYUSED — The amount of memory used by the throttle in bytes
WEBSERVICEREQQUEUED — Web Service requests waiting to run
WEBSERVICEREQRUNNING — Web Service requests running
WEBSERVICEREQTIMEDOUT — Web Service requests that timed out waiting to run
Monitoring must be turned on for this function to work fully. Stats providing details of memory consumed
will have values only if memory monitoring is turned on. The exception here is for JVM memory stats,
which will be available regardless of monitoring and/or memory monitoring being turned on or off.

Output:

getRequestDetails
remote array getRequestDetails ( string templatePath="", string functionName=""
)

Returns details for the specified request, or for all requests if template path is null

The details are returned in structs with the following keys:
TEMPLATEPATH — Full path to the template that was executed
FUNCTIONNAME– The name of the function that was invoked, if this was a web service, flash remoting, remote CFC or gateway request.
LASTRESPONSETIME — The time taken for the request to complete at the last invocation in milliseconds
LASTTIMEEXECUTED — The date/time at which the template/function was last invoked.
AVGTIME — The average response time for the template/function in milliseconds
MINTIME — The min response time for the template/function in milliseconds
MAXTIME — The max response time for the template/function in milliseconds
AVGREQUESTSIZE — The average amount of memory allocated over the course of the request in bytes
MAXREQUESTSIZE — The max amount of memory allocated over the course of the request in bytes
MINREQUESTSIZE — The min amount of memory allocated over the course of the request in bytes
LASTREQUESTSIZE — The amount of memory allocated over the course of the request at the last invocation in bytes
HITCOUNT — The hit count for the template/function
LASTERROR — Last error message for the template/function if any
LASTERRORAT — The date/time at which the last error occurred
ERRORCOUNT — The number of times errors have occurred for the template/function
TIMEOUTCOUNT — The number of times requests to the template/function have timed out
Monitoring must be turned on for this function to work. Stats providing details of memory consumed will have values only if memory monitoring is turned on.

Output:
Parameters:
templatePath: string, optional, templatePath
functionName: string, optional, functionName

getRequestLoad
remote numeric getRequestLoad (

)

Returns the request load for the server in requests/sec

Output:

getRequestMemoryUsedDetails
remote array getRequestMemoryUsedDetails ( required string templatepath, string functionname=""
)

Returns the 10 largest variables allocated during a request for the specified template path as an array of structs with the following keys:
VARIABLENAME — The name of the request variable
VARIABLETYPE — The type of the variable
VARIABLESCOPE — The scope in which the variable was declared, may be LOCAL (function local scope), PAGE (page scope) or REQUEST (request scope).
TEMPLATEPATH — Path to the template on which the template was declared.
FUNCTIONNAME — The name of the function in which the variable was declared, if any.
AVGSIZE — The average memory occupied by the variable in bytes
LASTSIZE — The size of the variable on the last request
Monitoring, memory monitoring and profiling must be turned on for this function to work.
This information will be available only for requests in the top memory used requests list.

Output:
Parameters:
templatepath: string, required, templatepath – The template path for which to return request size data
functionname: string, optional, functionname – The function invoked, if the URI points to a CFC

getRequestQueueStats
remote struct getRequestQueueStats (

)

Returns the request queue stats for template, Web service, Flash Remoting and CFC method requests.

Returns the request queue stats as struct with these keys
REQQUEUED — on JRun, the total number of request threads running
REQRUNNING — on JRun, the total number of request threads queued
REQTIMEDOUT — on JRun, the total number of request timeouts
TEMPLATEREQQUEUED — template requests waiting to run
TEMPLATEREQRUNNING — template requests running
TEMPLATEREQTIMEDOUT — template requests that timed out waiting to run
FLASHREMOTINGREQQUEUED — Flash remoting requests waiting to run
FLASHREMOTINGREQRUNNING — Flash remoting requests running
FLASHREMOTINGREQTIMEDOUT — Flash remoting requests that timed out waiting to run
WEBSERVICEREQQUEUED — Web Service requests waiting to run
WEBSERVICEREQRUNNING — Web Service requests running
WEBSERVICEREQTIMEDOUT — Web Service requests that timed out waiting to run
CFCREQQUEUED — CFC requests (via HTTP) waiting to run
CFCREQRUNNING — CFC requests (via HTTP) running
CFCREQTIMEDOUT — CFC requests (via HTTP) that timed out waiting to run
REQQUEUESTATSNA — ‘ ‘(This key is returned only in case the request queue stats are not available)

Output:

getRequestThrottleStats
remote array getRequestThrottleStats (

)

Returns throttle statistics for all requests which have been throttled as a array of structs with the following keys:
URI — The URI of the request that was throttled.
AVGTHROTTLESIZE — The average amount of throttle memory used, in bytes.
MAXTHROTTLESIZE — The max amount of throttle memory used, in bytes.
MINTHROTTLESIZE — The min amount of throttle memory used, in bytes.
Monitoring must be turned on for this function to work.

Output:

getRequestWithErrors
remote array getRequestWithErrors (

)

Returns the list of all requests with errors as an array of structs with the following keys:
TEMPLATEPATH — Full path to the template that was executed
FUNCTIONNAME– The name of the function that was invoked, if this was a web service, flash remoting, remote CFC or gateway request.
ERRORCOUNT — The number of times errors have occurred on this template.
LASTERRORAT — The date/time at which the last error occurred.
Monitoring must be turned on for this function to work.

Output:

getServerScopeMemoryUsed
remote array getServerScopeMemoryUsed (

)

Returns details of how the server scope memory is being used as an array of structs with the following keys:
VARIABLENAME — The name of the request variable
VARIABLETYPE — The type of the variable
SIZE — The memory occupied by the variable in bytes
Monitoring and memory monitoring must be turned on to get the SIZE attribute.

Output:

getSessionMemoryUsedDetails
remote array getSessionMemoryUsedDetails ( required string cfsessionid
)

Returns the size details of the specified session, if available with the following keys:
VARIABLENAME — The name of the request variable
VARIABLETYPE — The type of the variable
SIZE — The memory occupied by the variable in bytes
The session id passed in must be the CFSESSIONID.
Monitoring and memory monitoring must be turned on for this function to work properly.

Output:
Parameters:
cfsessionid: string, required, cfsessionid – The CF session id

getSlowCFThreadInvocationData
remote array getSlowCFThreadInvocationData ( required string templatepath, required lineno=""
)

Returns slow thread invocation data for the specified template path, and lineNo as an array of structs, each of which has the following keys. Data is returned only for the top slow tags/functions.
TAGNAME — name of the tag
FUNCTIONNAME — name of the function
TEMPLATEPATH — The path to the template on which the function or tag was invoked.
LINENO — The line no at which the tag or function was invoked.
CFSTACKTRACE — Array of stack frame strings showing the CF stack to the invocation of the tag/function.
AVGTIME — The average execution time for the tag/function.
MAXTIME — The maximum execution time for the tag/function.
MINTIME — The minimum execution time for the tag/function.
Monitoring and profiling must be turned on for this function to work.

Output:
Parameters:
templatepath: string, required, templatepath – The template path at which the thread was spawned
lineno: any, required, lineno – line no in the specified template where this thread was spawned

getSlowRequestInvocationData
remote array getSlowRequestInvocationData ( required string templatepath, string functionname=""
)

Returns the slow invocation data for the specified template path as an array of structs, each of which has the following keys.
Data is returned only for the top slow tags/functions.
TAGNAME — name of the tag
FUNCTIONNAME — name of the function
TEMPLATEPATH — The path to the template on which the function or tag was invoked.
LINENO — The line no at which the tag or function was invoked.
CFSTACKTRACE — Array of stack frame strings showing the CF stack to the invocation of the tag/function.
Monitoring and profiling must be turned on for this function to work.

Output:
Parameters:
templatepath: string, required, templatepath – The template path for which to return request invocation data
functionname: string, optional, functionname – The function invoked, if the template path points to a CFC

getSnapshotDir
public string getSnapshotDir (

)

Returns the directory path to the directory in which snapshot files are located

Output:

getSystemSnapshotFileNamePrefix
public string getSystemSnapshotFileNamePrefix (

)

Returns the prefix of the system-generated snapshot file

Output:

getTemplateCacheMetadata
remote array getTemplateCacheMetadata (

)

Returns an array of structs with templates/fragments cache metadata for the server grouped by applicaton
APPLICATIONNAME — the name of the application
CACHESIZE — total template cache size (required for serialization) for the application
HITRATIO — total hitcount/ total misscount
NUMBER — total number of templates/fragments in cache

Output:

getTemplateCacheStats
remote struct getTemplateCacheStats (

)

Returns statistics for the Template Cache as a struct with the following keys:
HITRATIO — The cache hit ratio
COUNT — The number of templates in the cache
SIZE — The cache size in bytes
Note: The Template Cache allows growth beyond its configured size using a secondary
cache. The data reported here is for both caches together, and so may show a COUNT
value greater than that configured via the CF Administrator.

Output:

getTimedOutRequests
remote array getTimedOutRequests (

)

Returns an array of struct of all timed out requests with the following keys:
TEMPLATEPATH — Full path to the template that was executed
FUNCTIONNAME– The name of the function that was invoked, if this was a web service, flash remoting, remote CFC or gateway request.
TIMEOUTCOUNT — The number of times timed out
LASTTIMEEXECUTED — When the template was last executed
AVGTIME — Average Amount of time before timeout
AVGREQUESTSIZE — Average Request scope size
Monitoring must be turned on for this function to work.

Output:

getTimeOutHistory
remote array getTimeOutHistory ( required string templatepath, string functionname=""
)

Returns details of the last ten timeou