mirror of
https://github.com/arut/nginx-rtmp-module.git
synced 2025-08-06 15:00:18 +08:00
added client id to stat
This commit is contained in:
@ -337,19 +337,23 @@ ngx_rtmp_stat_live(ngx_http_request_t *r, ngx_chain_t ***lll,
|
|||||||
#ifdef NGX_RTMP_POOL_DEBUG
|
#ifdef NGX_RTMP_POOL_DEBUG
|
||||||
ngx_rtmp_stat_dump_pool(r, lll, s->connection->pool);
|
ngx_rtmp_stat_dump_pool(r, lll, s->connection->pool);
|
||||||
#endif
|
#endif
|
||||||
|
NGX_RTMP_STAT_L("<id>");
|
||||||
|
NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf), "%ui",
|
||||||
|
(ngx_uint_t) s->connection->number)
|
||||||
|
- buf);
|
||||||
|
NGX_RTMP_STAT_L("</id>");
|
||||||
|
|
||||||
NGX_RTMP_STAT_L("<address>");
|
NGX_RTMP_STAT_L("<address>");
|
||||||
NGX_RTMP_STAT_S(&s->connection->addr_text);
|
NGX_RTMP_STAT_S(&s->connection->addr_text);
|
||||||
NGX_RTMP_STAT_L("</address>");
|
NGX_RTMP_STAT_L("</address>");
|
||||||
|
|
||||||
NGX_RTMP_STAT_L("<time>");
|
NGX_RTMP_STAT_L("<time>");
|
||||||
NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf),
|
NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf), "%M",
|
||||||
"%M", ngx_current_msec - s->epoch) - buf);
|
ngx_current_msec - s->epoch)
|
||||||
|
- buf);
|
||||||
NGX_RTMP_STAT_L("</time>");
|
NGX_RTMP_STAT_L("</time>");
|
||||||
|
|
||||||
NGX_RTMP_STAT_L("<dropped>");
|
NGX_RTMP_STAT_L("<dropped>");
|
||||||
/*NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf),
|
|
||||||
"%uz", ctx->ndropped) - buf);*/
|
|
||||||
NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf),
|
NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf),
|
||||||
"%uD/%uD", ctx->cs[1].dropped,
|
"%uD/%uD", ctx->cs[1].dropped,
|
||||||
ctx->cs[0].dropped) - buf);
|
ctx->cs[0].dropped) - buf);
|
||||||
|
2
stat.xsl
2
stat.xsl
@ -125,6 +125,7 @@
|
|||||||
<td colspan="12" ngcolor="#eeeeee">
|
<td colspan="12" ngcolor="#eeeeee">
|
||||||
<table cellspacing="1" cellpadding="5">
|
<table cellspacing="1" cellpadding="5">
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>Id</th>
|
||||||
<th>State</th>
|
<th>State</th>
|
||||||
<th>Address</th>
|
<th>Address</th>
|
||||||
<th>Flash version</th>
|
<th>Flash version</th>
|
||||||
@ -187,6 +188,7 @@
|
|||||||
<xsl:otherwise>#eeeeee</xsl:otherwise>
|
<xsl:otherwise>#eeeeee</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
|
<td><xsl:value-of select="id"/></td>
|
||||||
<td><xsl:call-template name="clientstate"/></td>
|
<td><xsl:call-template name="clientstate"/></td>
|
||||||
<td><xsl:value-of select="address"/></td>
|
<td><xsl:value-of select="address"/></td>
|
||||||
<td><xsl:value-of select="flashver"/></td>
|
<td><xsl:value-of select="flashver"/></td>
|
||||||
|
Reference in New Issue
Block a user