getInstanceStats()

RTMP/E

 getInstanceStats(appInst:String) : Object

HTTP

 http://www.example.com:1111/admin/getInstanceStats?auser=username&apswd=password&appInst=name

Gets the performance data for a specified instance of an application.

If you need information about the performance of a specific script, use the getScriptStats() method.

Beginning with Flash Media Server 3.5, you can dynamically control the core to which an application is sent. Controlling the cores allows load balancing across cores based on their performance counters. For more information, see Configure how applications are assigned to server processes.

Availability

Flash Communication Server 1.0

Parameters

appInst

A String indicating the name of the instance of the application for which you want performance statistics, in the form application_name/instance_name. Specify both the application name and the instance name, separated by a slash (/). Specify the two names, even if you want performance statistics for the default instance of the application. For example, to specify the default instance for an application named ChatApp, specify ChatApp/_defInst_.

auser

A String indicating the user name of the administrator.

apswd

A String indicating the password of the administrator.

Returns

RTMP/E

If the call succeeds, the server sends a reply information object with a level property of status, a code property of NetConnection.Call.Success, and a data property that is an object. The data object has the following properties:

Property

Description

name

String; The instance name of the application.

bw_in

Number; current bandwidth in, in bytes per second.

bw_out

Number; current bandwidth out, in bytes per second.

bytes_in

Number; total number of bytes read by this instance of the application.

bytes_out

Number; total number of bytes written by this instance of the application.

msg_in

Number; total number of messages processed by this instance of the application.

msg_out

Number; total number of messages sent by this instance of the application.

msg_dropped

Number; total number of messages dropped by this instance of the application.

total_connects

Number; total number of socket connections to this instance of the application since the instance was started.

total_disconnects

Number; total number of socket disconnections from this instance of the application since the instance was started.

connected

Number; total number of connections currently active.

normal_connects

Number; total number of normal connections.

virtual_connects

Number; total number of connections through a remote edge.

group_connects

Number; total number of connections from edge servers.

service_connects

Number; total number of service connections.

service_requests

Number; total number of services requested.

accepted

Number; total number of connection attempts accepted by this application.

rejected

Number; total number of connection attempts rejected by this application.

admin_connects

Number; total number of administrator connections.

debug_connects

Number; total number of debug connections.

launch_time

ActionScript Date object; time the instance was launched.

pid

Number; The pid of the core process running the instance.

core_id

Number; The core id of the core running the instance.

up_time

Number; length of time, in seconds, the instance has been running.

mode

String; “local” or “remote”. If the server is configured as an origin, the value is “local.” If the server is configured as an edge, the value is “remote”.

debug

Boolean; true if a debug session is enabled, otherwise false. See approveDebugSession().

script

Object that contains script engine performance data. The following are properties of the script object:

name: The instance name of the application.

time_high_water_mark: Number; maximum amount of time, in seconds, that the script has taken to execute an event.

queue_size: Number; total number of events currently in the script engine queue.

total_processed: Number; total number of events processed by the script engine.

queue_high_water_mark: Number; maximum number of events in the queue.

total_process_time: Number; number of seconds taken to process the number of events in total_processed.

swf_verification_attempts

Number; a counter of the number of SWF verification attempts made. Represents the total SWF verification credentials passed to the server for checking. There may be more than one credential presented per connection.

swf_verification_exceptions

Number; a counter of the number of SWF verification exceptions made. Exceptions are allowed through explicit configuration in the Application.xml file that allows certain user agents to bypass the requirement for SWF verification. Every connection allowed as an exception is counted here.

swf_verification_failures

Number; a counter of the number of SWF verification failures. Failures result from the presentation of SWF verification credentials that are found not to be a match for any loaded credential. Each failure corresponds to a disconnection of the presenting connection.

swf_verification_unsupported_rejects

Number; a counter of the number of SWF verification unsupported rejections. When a version of Flash Player that doesn’t support SWF verification connects to an application that requires SWF verification, the unsupported rejection count is increased. Also, the connecting client is disconnected.

swf_verification_matches

Number; a counter of the total number of matches. When an authentic SWF verification credential is presented, this number increases. There may be more than one match per connection.

swf_verification_remote_misses

Number; a counter of the proxy/remote server process’s missed SWF verification attempts. Whenever a proxy/remote server receives a SWF verification attempt it looks to its local cache for valid SWF verification. If it does not locate a match it logs a remote miss and defers to the origin to answer the verification attempt.

If the call fails, the server sends a reply information object with a level property of error and a code property of NetConnection.Call.Failed or a more specific value, if available. Some objects might also have a description property that contains a string describing the cause of the failure.

HTTP

If the call succeeds, it returns XML with the following structure:

 <result>   <level>status</level>   <code>NetConnect.Call.Success</code>   <timestamp>7/24/2008 7:16:27 PM</timestamp>   <data> <name>_defaultRoot_:_defaultVHost_:::_0</name>> <bw_in>0</bw_in> <bw_out>0</bw_out> <bytes_in>3073</bytes_in> <bytes_out>3453</bytes_out> <msg_in>0</msg_in> <msg_out>1</msg_out> <msg_dropped>0</msg_dropped> <total_connects>1</total_connects> <total_disconnects>0</total_disconnects> <connected>1</connected> <normal_connects>1</normal_connects> <virtual_connects>0</virtual_connects> <group_connects>0</group_connects> <service_connects>0</service_connects> <service_requests>0</service_requests> <admin_connects>0</admin_connects> <accepted>1</accepted> <rejected>0</rejected> <launch_time>7/24/2008 6:41:10 PM</launch_time> <pid>26912></pid> <core_id>0</core_id> <up_time>2117.079311</up_time> <mode>local</mode> <debug>false</debug> <script> <name>_defaultRoot_:_defaultVHost_:::_0</name> <time_high_water_mark>22</time_high_water_mark> <queue_size>0</queue_size> <total_processed>10</total_processed> <queue_high_water_mark>1</queue_high_water_mark> <total_process_time>44</total_process_time> </script> <swf_verification_attempts>0</swf_verification_attempts> <swf_verficiation_exceptions>0</swf_verfication_exceptions> <swf_verification_failures>0</swf_verification_failures> <swf_verification_unsupported_rejects>0</swf_verification_unsupported_rejects> <swf_verification_matches>0</swf_verification_matches> <swf_verification_remote_misses>0</swf_verification_remote_misses> </data>  </result>

Nested in the data element are elements for each property of the data object listed in the RTMP/E section.

If the call fails, it returns XML with the following structure:

 <result>   <level></level>   <code></code>   <description></description>   <timestamp></timestamp>  </result>

The XML elements contain the same information as the Object properties returned in an RTMP/E call.

Note: The timestamp response over HTTP is formatted differently on Windows (9/23/2007 6:16:40 PM) and Linux (Sun 23 Sep 2007 06:16:40 PM IST).

See also

Get help faster and easier

New user?