CFML Reference
|
|
ColdFusion Functions
|
GetMetricData
Description
On Windows NT, GetMetricData
returns system and application metrics, depending on the value of the mode parameter.
Category
System functions
Syntax
GetMetricData(mode)
Parameters
Parameter |
Description |
mode
|
The name of the metric. The metrics that you can check are:
PERF_MONITOR Returns internal data that is otherwise displayed in the Windows NT PerfMonitor. To receive this information, you must turn on the PerfMonitor feature in the ColdFusion Administrator before executing the function. See the Usage section for details on the structure that is returned.
SIMPLE_LOAD Returns an integer value that is computed from the state of the server's internal queues, and reflects the overall load on the server.
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.
The window of time over which the AVG_REQ_TIME value is calculated is controlled by the following registry setting:
MyComputer\HKEY_LOCL_MACHINE\SOFTWARE\Allaire\ColdFusion\
CurrentVersion\Server\ReqAvgWindowSec.
The default window is 120 seconds. Changing the registry setting to zero disables this feature and removes overhead associated with gathering data.
|
Usage
On Windows NT, if you use mode = "PERF_MONITOR"
the function returns a ColdFusion structure with the following data fields:
- InstanceName
- PageHits
- ReqQueued
- DBHits
- ReqRunning
- ReqTimedOut
- BytesIn
- BytesOut
- AvgQueueTime
- AvgReqTime
- AvgDBTime
- CachePops
Example
<!---------------------------------------------------------------------
This example gets and displays the metric data provided by
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>
CachePops: #pmData.CachePops# <P>
</cfoutput>
Copyright © 2001, Macromedia Inc. All rights reserved. |
|