mirror of
https://github.com/arut/nginx-rtmp-module.git
synced 2025-08-06 15:00:18 +08:00
added pid to stat
This commit is contained in:
@ -458,6 +458,7 @@ ngx_rtmp_stat_handler(ngx_http_request_t *r)
|
|||||||
size_t n;
|
size_t n;
|
||||||
off_t len;
|
off_t len;
|
||||||
static u_char tbuf[NGX_TIME_T_LEN + 1];
|
static u_char tbuf[NGX_TIME_T_LEN + 1];
|
||||||
|
static u_char nbuf[NGX_OFF_T_LEN + 1];
|
||||||
|
|
||||||
r->keepalive = 0;
|
r->keepalive = 0;
|
||||||
slcf = ngx_http_get_module_loc_conf(r, ngx_rtmp_stat_module);
|
slcf = ngx_http_get_module_loc_conf(r, ngx_rtmp_stat_module);
|
||||||
@ -492,6 +493,11 @@ ngx_rtmp_stat_handler(ngx_http_request_t *r)
|
|||||||
#endif
|
#endif
|
||||||
NGX_RTMP_STAT_L("<built>" __DATE__ " " __TIME__ "</built>\r\n");
|
NGX_RTMP_STAT_L("<built>" __DATE__ " " __TIME__ "</built>\r\n");
|
||||||
|
|
||||||
|
NGX_RTMP_STAT_L("<pid>");
|
||||||
|
NGX_RTMP_STAT(nbuf, ngx_snprintf(nbuf, sizeof(nbuf),
|
||||||
|
"%ui", (ngx_uint_t) ngx_getpid()) - nbuf);
|
||||||
|
NGX_RTMP_STAT_L("</pid>\r\n");
|
||||||
|
|
||||||
NGX_RTMP_STAT_L("<uptime>");
|
NGX_RTMP_STAT_L("<uptime>");
|
||||||
NGX_RTMP_STAT(tbuf, ngx_snprintf(tbuf, sizeof(tbuf),
|
NGX_RTMP_STAT(tbuf, ngx_snprintf(tbuf, sizeof(tbuf),
|
||||||
"%T", ngx_cached_time->sec - start_time) - tbuf);
|
"%T", ngx_cached_time->sec - start_time) - tbuf);
|
||||||
|
1
stat.xsl
1
stat.xsl
@ -13,6 +13,7 @@
|
|||||||
<hr/>
|
<hr/>
|
||||||
Generated by <a href='https://github.com/arut/nginx-rtmp-module'>NGINX RTMP module</a>,
|
Generated by <a href='https://github.com/arut/nginx-rtmp-module'>NGINX RTMP module</a>,
|
||||||
<a href="http://nginx.com">NGINX</a> <xsl:value-of select="/rtmp/version"/>,
|
<a href="http://nginx.com">NGINX</a> <xsl:value-of select="/rtmp/version"/>,
|
||||||
|
pid <xsl:value-of select="/rtmp/pid"/>,
|
||||||
built <xsl:value-of select="/rtmp/built"/> <xsl:value-of select="/rtmp/compiler"/>
|
built <xsl:value-of select="/rtmp/built"/> <xsl:value-of select="/rtmp/compiler"/>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user