com.esri.arcgis.server
Interface IServerStatistics

All Superinterfaces:
Serializable
All Known Implementing Classes:
IServerStatisticsProxy, ServerObjectAdmin

public interface IServerStatistics
extends Serializable

Provides access to members that report statistics for a GIS server to administrators.

Remarks

As the GIS server creates and destroys server objects, handles client requests and so on, statistics about these events are logged in the GIS server's logs. In addition to the log, statistics are also kept in memory and can be queried using the IServerStatistcs interface. The IServerStatistics interface is a supported interface on ServerObjectAdmin.

You can query the GIS server for statistics on the following events described by esriServerStatEvent:

Value Description

esriSSEContextCreated

A client made a call to CreateServerContext on IServerObjectManager and got a reference to a server context.

esriSSEContextCreationFailed

CreateServerContext failed due to an error. Errors will be logged in tht e GIS server's log files.

esriSSEContextCreationTimeout

CreateServerContext timed out because there we no available server objects for the requested configuration for a duration linger than the server object configuration's WaitTimeout.

esriSSEContextReleased

A client released the server context by calling ReleaseServerContext. The time measured is the time the client held onto the context (the time between when they called CreateServerContext and got a reference to the server context, and the time they released the context by calling ReleaseServerContext).

esriSSEContextUsageTimeout

A client did not release the server context by calling ReleaseServerContext before the context's server object configuration's UsageTimeout was reached.

esriSSEServerObjectCreated

A new server object was created. This can happen when a pooled configuration is started and the object pool is populated, when a server object is recycled, or in response to a call to CreateServerContext. The time measured is the time to create the server object instance.

esriSSEServerObjectCreationFailed

The creation of a new server object instance failed due to an error. Errors will be logged in tht e GIS server's log files.

You can query these events using the statistical functions described by esriServerStatFunction :

esriSSFCount
esriSSFMinimum
esriSSFMaximum
esriSSFSum
esriSSFSumSquares
esriSSFMean
esriSSFStandardDeviation

Note: for esriSSEContextCreationFailed, esriSSEContextCreationTimeout, esriSSEContextUsageTimeout and esriSSEServerObjectCreationFailed , the only relevant statistical function is esriSSFCount , as these events do not have time associated with them. The other functions reflect the statistics of the elapsed time associated with the event.

While the GIS server's logs maintain a record of all events in the server, the set of statistics that are in memory and that can be queried are accumulated summaries of time slices since the GIS server was started. The granularity of these time slices is more coarse the futher back in time you go. These statistics can be queried for the following time intervals:

Each time period is an accumulated total of the statistics for that time period. For example, if you query for the total number of request to create server contexts for the last 30 days, you would get statistics from now to the begning of the day 30 days ago (not to the current time on that day). This is because the in memory statistcs have been combined for that entire day.

This means that you may actually get statistics for a longer period that you speficied in your query. When you query the GIS server for statistics, you can use the IServerTimeRange interface to get a report of the actual time period that your queries results reflect.

The IServerStatistics interface has methods for querying a specific statistical function for an event, or for querying all statistical functions for an event:

Use the GetSpecificStatisticForTimeIntervals method to query the GIS server for a specific statistic for an event at descrete time intervals. For example you can use this method to get the count of all server contexts that were created for each minute of the last hour.

Use the GetAllStatisticsForTimeInterval to query the GIS server for all statistics for an event. For example you can use this method to get the sum, mean, etc of server contexts usage time for the last 2 days.

These methods can be used to query based on the the events occuring in the server as a whole (i.e. accross all host machines), or for those occuring on a specific host machine. Additionally, these methods can be used to query based on the events using all server objects, or for events on a particular server object.

You specify the time interval for which you want to query using an index of time periods relative to the current time based on the time period described by esriServerTimePeriod. The index argument to the GetSpecificStatisticForTimeIntervals and GetAllStatisticsForTimeInterval methods describes the index of the time period to start from, and the length argument describes the number of time periods to query.

For example, to query for all statics in the last 2 hours, specify a time period of esriSTPHour, an index of 0 and a length of 2.

To query for all statistics since the server started, specify a time period of esriSTPNone, an index of 0 and a length of 1.

If you are unsure of the actual time period that the results of your query reflect, use the IServerTimeRange interface to get a report of the actual time period that your queries results reflect.

Use the Reset method to clear the statistics in memory.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 IStatisticsResults getAllStatisticsForTimeInterval(int event, int period, int index, int length, String name, String type, String machine)
          Gets a set of statistics, such as count, min, max, mean for an event (such as context usage time) for a specified time period.
 IDoubleArray getSpecificStatisticForTimeIntervals(int event, int function, int period, int index, int length, String name, String type, String machine)
          Gets a specific statistic (such as total count of server contexts created) for a specified time period.
 void reset()
          Clears out the currently gathered statistics.
 

Method Detail

reset

void reset()
           throws IOException,
                  AutomationException
Clears out the currently gathered statistics.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSpecificStatisticForTimeIntervals

IDoubleArray getSpecificStatisticForTimeIntervals(int event,
                                                  int function,
                                                  int period,
                                                  int index,
                                                  int length,
                                                  String name,
                                                  String type,
                                                  String machine)
                                                  throws IOException,
                                                         AutomationException
Gets a specific statistic (such as total count of server contexts created) for a specified time period.

Remarks

Use the GetSpecificStatisticForTimeIntervals method to query the GIS server for a specific statistic for an event at descrete time intervals. For example you can use this method to get the count of all server contexts that were created for each minute of the last hour.

The server event is specified by the event argument, and the statistical function to qeury is specified by the function argument.

This method can be used to query based on the the events occuring in the server as a whole (i.e. accross all host machines), or for those occuring on a specific host machine. Additionally, these methods can be used to query based on the events using all server objects, or for events on a particular server object.

To specify a specific machine, specify its name for the machine argument. For all machines, use a blank string for the machine argument.

To specify a specific server object, specify its name for the Name argument and type for the Type argument. For all server objects, use a blank string for both name and type.

You specify the time interval for which you want to query using an index of time periods relative to the current time based on the time period described by esriServerTimePeriod. The index argument to the GetSpecificStatisticForTimeIntervals method describes the index of the time period to start from, and the length argument describes the number of time periods to query.

For example, to query for statics for each hour in the last 2 hours, specify a time period of esriSTPHour, an index of 0 and a length of 2.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
event - A com.esri.arcgis.server.esriServerStatEvent constant (in)
function - A com.esri.arcgis.server.esriServerStatFunction constant (in)
period - A com.esri.arcgis.server.esriServerTimePeriod constant (in)
index - The index (in)
length - The length (in)
name - The name (in)
type - The type (in)
machine - The machine (in)
Returns:
A reference to a com.esri.arcgis.system.IDoubleArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAllStatisticsForTimeInterval

IStatisticsResults getAllStatisticsForTimeInterval(int event,
                                                   int period,
                                                   int index,
                                                   int length,
                                                   String name,
                                                   String type,
                                                   String machine)
                                                   throws IOException,
                                                          AutomationException
Gets a set of statistics, such as count, min, max, mean for an event (such as context usage time) for a specified time period.

Remarks

Use the GetAllStatisticsForTimeInterval to query the GIS server for all statistics for an event. For example you can use this method to get the sum, mean, etc of server contexts usage time for the last 2 days.

The server event is specified by the event argument, and the statistical function to qeury is specified by the function argument.

This method can be used to query based on the the events occuring in the server as a whole (i.e. accross all host machines), or for those occuring on a specific host machine. Additionally, these methods can be used to query based on the events using all server objects, or for events on a particular server object.

To specify a specific machine, specify its name for the machine argument. For all machines, use a blank string for the machine argument.

To specify a specific server object, specify its name for the Name argument and type for the Type argument. For all server objects, use a blank string for both name and type.

You specify the time interval for which you want to query using an index of time periods relative to the current time based on the time period described by esriServerTimePeriod. The index argument to the GetAllStatisticsForTimeInterval method describes the index of the time period to start from, and the length argument describes the number of time periods to query.

For example, to query for all statics in the last 2 hours, specify a time period of esriSTPHour, an index of 0 and a length of 2.

To query for all statistics since the server started, specify a time period of esriSTPNone, an index of 0 and a length of 1.

If you are unsure of the actual time period that the results of your query reflect, use the IServerTimeRange interface to get a report of the actual time period that your queries results reflect.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
event - A com.esri.arcgis.server.esriServerStatEvent constant (in)
period - A com.esri.arcgis.server.esriServerTimePeriod constant (in)
index - The index (in)
length - The length (in)
name - The name (in)
type - The type (in)
machine - The machine (in)
Returns:
A reference to a com.esri.arcgis.system.IStatisticsResults
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.