This document is archived and information here might be outdated.  Recommended version.


IServerStatus.InstanceCount Property (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Server)  

IServerStatus.InstanceCount Property

The number of server object instances currently running in the ArcGIS server.

[Visual Basic .NET]
Public Function get_InstanceCount ( _
    ByVal access As esriAccessLevel _
) As Integer
[C#]
public int get_InstanceCount (
    esriAccessLevel access
);
[C++]
HRESULT get_InstanceCount(
  esriAccessLevel access,
  long* pVal
);
[C++]

Parameters access [in]
access is a parameter of type esriAccessLevel pVal [out, retval] pVal is a parameter of type long

Product Availability

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

Remarks

The InstanceCount property holds the number of server object instances currently running on the entire ArcGIS Server (includes all SOC machines). This number will always contain two more configuration instances than you deploy.  These two "extra" configuration instances correspond to an instance of the SDM.ServerDirectoryManager and an instance of the SrvLog.ServerLog configurations and are started and controlled by the SOM.  You cannot alter these configurations.  It is also important to note that these two instances do participate in the total number of instances allowed by the server configuration Capacity property. For example, if you set Capacity=22, you will only be able to add 20 more configuration instances before the pool-shrinking algorithm engages. However, these two configurations will not be removed in a pool-shrinking operation and will stay on the machine on which they were instantiated unless that machine is removed or becomes disabled.  In this case, the two instances will get redistributed to somewhere on the other SOC machines.

See Also

IServerStatus Interface