GETMETRICDATA | |||||||||||||||||||||||||||
Description
Gets server performance metrics. |
|||||||||||||||||||||||||||
Returns
ColdFusion structure that contains metric data, depending on the mode value. |
|||||||||||||||||||||||||||
Category
System functions |
|||||||||||||||||||||||||||
Function syntaxGetMetricData(mode) |
|||||||||||||||||||||||||||
History
ColdFusion MX: Deprecated the cachepops parameter. It might not work, and it might cause an error, in later releases. |
|||||||||||||||||||||||||||
Parameters
|
|||||||||||||||||||||||||||
Usage
If mode = "perf_monitor", the function returns a structure with these data fields:
|
|||||||||||||||||||||||||||
Example<!--- This example gets and displays metric data from Windows NT PerfMonitor - --> <cfset pmData = GetMetricData( "PERF_MONITOR" ) > <cfoutput> Current PerfMonitor data is: <p> InstanceName: #pmData.InstanceName# <p> PageHits: #pmData.PageHits# <p> ReqQueued: #pmData.ReqQueued# <p> DBHits: #pmData.DBHits# <p> ReqRunning: #pmData.ReqRunning# <p> ReqTimedOut: #pmData.ReqTimedOut# <p> BytesIn: #pmData.BytesIn# <p> BytesOut: #pmData.BytesOut# <p> AvgQueueTime: #pmData.AvgQueueTime# <p> AvgReqTime: #pmData.AvgReqTime# <p> AvgDBTime: #pmData.AvgDBTime# <p> </cfoutput> |
MODE | |
simple_load
Returns an integer value that is computed from the state of the server's internal queues. Indicates the overall server load.
prev_req_time
Returns the time, in milliseconds, that it took the server to process the previous request.
avg_req_time
Returns the average time, in milliseconds, that it takes the server to process a request.
Changing the setting to 0 prevents the server from calculating the average and removes overhead associated with gathering data.
The default value is 120 seconds.