RTMP/E

 getAppStats(appname:String):Object

HTTP

 http://www.example.com:1111/admin/getAppStats?auser=username&apswd=password&app|appname=name

Gets aggregate performance data for all instances of the specified application.

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. In getAppStats, an additional field consisting of the pids and core ids of the cores running the application are sent in the response.

Availability

Flash Communication Server 1.0.

Parameters

appname

A String indicating the name of the application to be added.

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

accepted

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

bytes_in

Number; total number of bytes read by this application.

bytes_out

Number; total number of bytes written by this application.

connected

Number; total number of connections currently active.

launch_time

ActionScript Date object; time the application started.

msg_dropped

Number; total number of messages dropped by this application.

msg_in

Number; total number of messages processed by this application.

msg_out

Number; total number of messages sent by this application.

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 remote edges that are connected.

service_connects

Number; total number of service connections.

service_requests

Number; total number of services requested.

admin_connects

Number; total number of administrator connections.

debug_connects

Number; total number of debug connections.

rejected

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

bw_in

Number; current bandwidth in, in bytes per second.

bw_out

Number; current bandwidth out, in bytes per second.

total_connects

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

total_disconnects

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

total_instances_loaded

Number; total number of instances that have been loaded since the application started.

This property does not represent the total number of active instances loaded. To get the number of active instances loaded, subtract the value of total_instances_unloaded from total_instances_loaded.

total_instances_unloaded

Number; total number of instances that have been unloaded since the application started.

up_time

Number; time, in seconds, the application has been running.

swf_verification_attempts

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

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

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

A counter of the number of SWF verification unsupported rejections. A version of Flash Player that doesn’t support SWF verification may try to connect to an application that requires SWF verification. When this occurs, the unsupported rejection count is increased and the connecting client is disconnected.

swf_verification_matches

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

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.

cores

An array containing elements “pid” and “core_id”. The number of elements in the core_id array depends on the number of cores in which the application is running currently.

Following is the output of getAppStats:

 <result>   <level>status</level>   <code>NetConnect.Call.Success</code>   <timestamp>7/24/2008 3:50:55 PM</timestamp>   <data> <launch_time>7/24/2008 3:21:02 PM</launch_time> <up_time>1792</up_time> <bw_in>0</bw_in> <bw_out>0</bw_out> <bytes_in>3073</bytes_in> <bytes_out>3417</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> <total_instances_loaded>1</total_instances_loaded> <total_instances_unloaded>0</total_instances_unloaded> <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> <cores> <_0> <pid>1234</pid> <core_id>0</code_id> </_0> <_1> <pid>5678</pid> <core_id>1</core_id> </_1> </cores> </data>  </result>

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, the server returns XML with the following structure:

 <result>   <level></level>   <code></code>   <timestamp></timestamp>   <data></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).

Example

The following two examples use an application instance named app_1 on both an origin and an edge server. Use the following URL to call getAppStats() on an origin server:

 http://origin.example.com:1111/admin/getAppStats?auser=username&apswd=password &appName=app_1

Use the following URL to call getAppStats() on an edge server:

 http://edge.example.com:1111/admin/getAppStats?auser=username&apswd=password&appName=app_1@edge.example.com

Note:

To obtain the application name, log in to the edge server on the Administration Console or call getActiveInstances(). When appName=app_1 is run on the edge server, all zeroed information is displayed.

See also

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy