User Guide
Chapter 2: ColdFusion Functions 363
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: #pmData.InstanceName# <P>
PageHits: #pmData.PageHits# <P>
ReqQueued: #pmData.ReqQueued# <P>
DBHits: #pmData.DBHits# <P>