获取FMS的状态信息

application.getStats()

application.getStats()

Returns statistics about an application.

Returns

An Object whose properties contain statistics about the application instance. The following table describes the properties:

Property

Description

bw_in

Total number of kilobytes received.

bw_out

Total number of kilobytes sent.

bytes_in

Total number of bytes sent.

bytes_out

Total number of bytes received.

Note: For billing, use the sc-bytes field in the Access log.

msg_in

Total number of Real-Time Messaging Protocol (RTMP) messages sent.

msg_out

Total number of RTMP messages received.

msg_dropped

Total number of RTMP messages dropped.

server_bytes_in

Total number of bytes received by the server.

server_bytes_out

Total number of bytes sent by the server.

total_connects

Total number of clients connected to an application instance.

total_disconnects

Total number of clients who have disconnected from an application instance.

Example

The following example outputs application statistics to the Live Log panel in the Administration Console:

function testStats(){ 
    var stats = application.getStats(); 
    for(var prop in stats){ 
         trace("stats." + prop + " = " + stats[prop]); 
    } 
} 
 
application.onConnect = function(client){ 
    this.acceptConnection(client);  
    testStats();     
};

转载于:https://www.cnblogs.com/fuland/p/3779541.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值