View comments | RSS feed
Contents > CFML Reference > ColdFusion Functions > GetMetricData PreviousNext

GetMetricData

Gets server performance metrics.

ColdFusion structure that contains metric data, depending on the mode value.

System functions

GetMetricData(mode)

ColdFusion MX: Deprecated the cachepops parameter. It might not work, and it might cause an error, in later releases.

Parameter

Option

Description

mode

perf_monitor

Returns internal data, in a structure.

To receive data, you must enable PerfMonitor in ColdFusion Administrator before executing the function.

On Windows, this data is otherwise displayed in the Windows PerfMonitor.

 

simple_load

Returns an integer value that is computed from the state of the server's internal queues. Indicates the overall server load.

 

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.

Changing the setting to 0 prevents the server from calculating the average and removes overhead associated with gathering data.

Default: 120 seconds.

If mode = "perf_monitor", the function returns a structure with these data fields:

Field

Description

InstanceName

The name of the ColdFusion server. Default: cfserver

PageHits

Number of HTTP requests received since ColdFusion MX 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 MX

BytesOut

Number of bytes in HTTP responses from ColdFusion MX

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.

<!--- This example gets and displays metric data from 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>
</cfoutput>

Contents > CFML Reference > ColdFusion Functions > GetMetricData PreviousNext

ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

Comments


No screen name said on Aug 22, 2003 at 10:32 AM :
simple_load doesn't work.

Tested in CFMX 6.1 (Win2000), CFMX Ent (Solaris), CFMX Ent 6.1 (Red Hat Linux Enterprise 2.1).
Franky Wong said on Aug 22, 2003 at 11:47 AM :
simple_load doesn't work.

Tested in:
CF 5.0 (W2K, IIS 5.0)
CF MX Ent (Solaris 8, Apache 2.0.47)
CF MX 6.1 (W2K, IIS 5.0)
CF MX 6.1 Ent (Red Hat Linux Enterprise 2.1, Apache 2.0.47)

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct103.htm