mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-06-05 16:09:31 +02:00
added naccepted value to stat
This commit is contained in:
parent
c514c9f715
commit
f4b29b0547
|
@ -577,6 +577,9 @@ extern ngx_rtmp_bandwidth_t ngx_rtmp_bw_out;
|
||||||
extern ngx_rtmp_bandwidth_t ngx_rtmp_bw_in;
|
extern ngx_rtmp_bandwidth_t ngx_rtmp_bw_in;
|
||||||
|
|
||||||
|
|
||||||
|
extern ngx_uint_t ngx_rtmp_naccepted;
|
||||||
|
|
||||||
|
|
||||||
extern ngx_uint_t ngx_rtmp_max_module;
|
extern ngx_uint_t ngx_rtmp_max_module;
|
||||||
extern ngx_module_t ngx_rtmp_core_module;
|
extern ngx_module_t ngx_rtmp_core_module;
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,9 @@ static void ngx_rtmp_ping(ngx_event_t *rev);
|
||||||
static ngx_int_t ngx_rtmp_finalize_set_chunk_size(ngx_rtmp_session_t *s);
|
static ngx_int_t ngx_rtmp_finalize_set_chunk_size(ngx_rtmp_session_t *s);
|
||||||
|
|
||||||
|
|
||||||
|
ngx_uint_t ngx_rtmp_naccepted;
|
||||||
|
|
||||||
|
|
||||||
ngx_rtmp_bandwidth_t ngx_rtmp_bw_out;
|
ngx_rtmp_bandwidth_t ngx_rtmp_bw_out;
|
||||||
ngx_rtmp_bandwidth_t ngx_rtmp_bw_in;
|
ngx_rtmp_bandwidth_t ngx_rtmp_bw_in;
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ ngx_rtmp_init_connection(ngx_connection_t *c)
|
||||||
ngx_rtmp_in6_addr_t *addr6;
|
ngx_rtmp_in6_addr_t *addr6;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
++ngx_rtmp_naccepted;
|
||||||
|
|
||||||
/* find the server configuration for the address:port */
|
/* find the server configuration for the address:port */
|
||||||
|
|
||||||
|
|
|
@ -578,6 +578,11 @@ ngx_rtmp_stat_handler(ngx_http_request_t *r)
|
||||||
"%T", ngx_cached_time->sec - start_time) - tbuf);
|
"%T", ngx_cached_time->sec - start_time) - tbuf);
|
||||||
NGX_RTMP_STAT_L("</uptime>\r\n");
|
NGX_RTMP_STAT_L("</uptime>\r\n");
|
||||||
|
|
||||||
|
NGX_RTMP_STAT_L("<naccepted>");
|
||||||
|
NGX_RTMP_STAT(nbuf, ngx_snprintf(nbuf, sizeof(nbuf),
|
||||||
|
"%ui", ngx_rtmp_naccepted) - nbuf);
|
||||||
|
NGX_RTMP_STAT_L("</naccepted>\r\n");
|
||||||
|
|
||||||
ngx_rtmp_stat_bw(r, lll, &ngx_rtmp_bw_in, &ngx_rtmp_bw_out);
|
ngx_rtmp_stat_bw(r, lll, &ngx_rtmp_bw_in, &ngx_rtmp_bw_out);
|
||||||
|
|
||||||
cscf = cmcf->servers.elts;
|
cscf = cmcf->servers.elts;
|
||||||
|
|
3
stat.xsl
3
stat.xsl
|
@ -36,7 +36,8 @@
|
||||||
<th>Time</th>
|
<th>Time</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"/>
|
<td>@<xsl:value-of select="naccepted"/></td>
|
||||||
|
<td/>
|
||||||
<td><xsl:value-of select="in"/></td>
|
<td><xsl:value-of select="in"/></td>
|
||||||
<td><xsl:value-of select="out"/></td>
|
<td><xsl:value-of select="out"/></td>
|
||||||
<td><xsl:value-of select="round(bwin div 1024)"/></td>
|
<td><xsl:value-of select="round(bwin div 1024)"/></td>
|
||||||
|
|
Loading…
Reference in a new issue