Chapter 2: ColdFusion Functions
GetMetricData
On Windows NT, GetMetricData returns all the internal data that is otherwise
displayed in the Windows NT PerfMonitor. On UNIX, GetMetricData returns all of the
internal data found by using CFStat. For it to work on NT you need to have turned on
the PerfMonitor feature from the ColdFusion Administrator. See the Usage section for
details of the structure that this function returns.
Syntax
GetMetricData( monitor_name )
monitor_name
The name of the performance monitor. On Windows NT, the performance
monitor is PerfMonitor. On UNIX, it is CFStat.
Usage
On Windows NT, 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:
PageHits:
ReqQueued:
DBHits:
#pmData.InstanceName# <P>
#pmData.PageHits# <P>
#pmData.ReqQueued# <P>
#pmData.DBHits# <P>
363
Need help?
Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?