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:

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>


1