Home

Traffic Server Software Developers Kit

Coupled Statistics

INKStatCoupledGlobalAdd

.Creates a global coupled stat.

Prototype

INKStat INKStatCoupledGlobalAdd (INKCoupledStat global_copy , const char * the_name , INKStatTypes the_type )

Description

global_copy is the name of the global coupled stat category to which your new coupled stat belongs.

the_name is the name you use to view the statistic using Traffic Line (see Viewing Statistics Using Traffic Line). There are two INKStatTypes: INKSTAT_TYPE_INT64, and INKSTAT_TYPE_FLOAT (see How to Add Coupled Statistics).

Returns

A handle to the newly-created global coupled stat.

INK_ERROR_PTR if an error occurs.

INKStatCoupledLocalAdd

Creates a local copy of a global coupled stat.

Prototype

INKStat INKStatCoupledLocalAdd (INKCoupledStat local_copy , const char * the_name , INKStatTypes the_type )

Description

local_copy is the name of the local coupled stat category to which your new coupled stat belongs.

the_name is the name you use to view the statistic using Traffic Line (see Viewing Statistics Using Traffic Line). There are two INKStatTypes: INKSTAT_TYPE_INT64, and INKSTAT_TYPE_FLOAT (see To Add Coupled Statistics).

Returns

A handle to a local copy of the global coupled stat.

INK_ERROR_PTR if an error occurs.

INKStatCoupledGlobalCategoryCreate

Creates a global coupled stat category.

Prototype

INKCoupledStat INKStatCoupledGlobalCategoryCreate ( const char * the_name )

Description

Returns a new global coupled stat category; use this function in INKPluginInit. The name argument is the name you use to access this stat in Traffic Line (see Viewing Statistics Using Traffic Line and To Add Coupled Statistics).

Returns

A handle to a the newly-created global coupled stat category.

INK_ERROR_PTR if an error occurs.

INKStatCoupledLocalCopyCreate

.Creates a local copy of a global coupled stat category.

Prototype

INKCoupledStat INKStatCoupledLocalCopyCreate ( const char * the_name , INKCoupledStat global_copy)

Description

Returns a new local coupled stat category; use this function in any routine where you need to modify local copies of global statistics. The name argument is the name you use to access this stat in Traffic Line (see Viewing Statistics Using Traffic Line and How to Add Coupled Statistics).

Returns

A handle to the local copy of the global coupled stat category.

INK_ERROR_PTR

INKStatCoupledLocalCopyDestroy

.Destroys a local category of statistics.

Prototype

INKReturnCode INKStatCoupledLocalCopyDestroy (INKCoupledStat local_copy)

Description

Destroys a local statistics category. You should always destroy the local category when you are finished with it (see How to Add Coupled Statistics).

Returns

INK_SUCCESS if the operation completes successfully.

INK_ERROR if an error occurs.

INKStatsCoupledUpdate

Updates a category of coupled statistics.

Prototype

INKReturnCode INKStatsCoupledUpdate (INKCoupledStat local_copy)

Description

Updates all of the coupled stats belonging to the category local_copy. See How to Add Coupled Statistics.

Returns

INK_SUCCESS if the operation completes successfully.

INK_ERROR if an error occurs.