getMetricData
Description
Gets server performance metrics.
Categories
History
ColdFusion
MX: Deprecated the cachepops parameter. It might
not work, and it might cause an error, in later releases.
Syntax
GetMetricData(mode)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| simple_load | |||
| prev_req_time | |||
| avg_req_time | |||
| mode | perf_monitor |
Returns
ColdFusion
structure that contains metric data, depending on the mode value.
Usage
If mode="perf_monitor", the function returns a structure with these data fields:
Field
Description
InstanceName
The name of the ColdFusion server. The default value is cfserver.
PageHits
Number of HTTP requests received since ColdFusion was started.
ReqQueued
Number of HTTP requests in the staging queue, waiting for processing.
DBHits
Number of database requests since the server was started.
ReqRunning
Number of HTTP requests currently running.
In the ColdFusion Administrator, you can set the maximum number of requests that run concurrently.
ReqTimedOut
Number of HTTP requests that timed out while in the staging queue or during processing.
BytesIn
Number of bytes in HTTP requests to ColdFusion.
BytesOut
Number of bytes in HTTP responses from ColdFusion.
AvgQueueTime
For the last two HTTP requests (current and previous), the average length of time the request waited in the staging queue.
AvgReqTime
For the last two HTTP requests (current and previous), the average length of time the server required to process the request
AvgDBTime
For the last two HTTP requests (current and previous), the average length of time the server took to process CFQueries in the request.
cachepops
This parameter is deprecated. ColdFusion automatically sets its value to -1.
Field
Description
InstanceName
The name of the ColdFusion server. The default value is cfserver.
PageHits
Number of HTTP requests received since ColdFusion was started.
ReqQueued
Number of HTTP requests in the staging queue, waiting for processing.
DBHits
Number of database requests since the server was started.
ReqRunning
Number of HTTP requests currently running.
In the ColdFusion Administrator, you can set the maximum number of requests that run concurrently.
ReqTimedOut
Number of HTTP requests that timed out while in the staging queue or during processing.
BytesIn
Number of bytes in HTTP requests to ColdFusion.
BytesOut
Number of bytes in HTTP responses from ColdFusion.
AvgQueueTime
For the last two HTTP requests (current and previous), the average length of time the request waited in the staging queue.
AvgReqTime
For the last two HTTP requests (current and previous), the average length of time the server required to process the request
AvgDBTime
For the last two HTTP requests (current and previous), the average length of time the server took to process CFQueries in the request.
cachepops
This parameter is deprecated. ColdFusion automatically sets its value to -1.
Example
<!--- This example gets and displays metric data from Windows NT PerfMonitor --->
<cfset pmData = GetMetricData( "PERF_MONITOR" ) >
<cfoutput>
Current PerfMonitor data is:
InstanceName: #pmData.InstanceName#
PageHits: #pmData.PageHits#
ReqQueued: #pmData.ReqQueued#
DBHits: #pmData.DBHits#
ReqRunning: #pmData.ReqRunning#
ReqTimedOut: #pmData.ReqTimedOut#
BytesIn: #pmData.BytesIn#
BytesOut: #pmData.BytesOut#
AvgQueueTime: #pmData.AvgQueueTime#
AvgReqTime: #pmData.AvgReqTime#
AvgDBTime: #pmData.AvgDBTime#
</cfoutput>