nginx-rtmp 之统计在线clients
生活随笔
收集整理的這篇文章主要介紹了
nginx-rtmp 之统计在线clients
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
1. 使用Statistics 模塊中的以下兩個(gè)命令來(lái)實(shí)現(xiàn)統(tǒng)計(jì)在線人數(shù)的功能
- rtmp_stat
- rtmp_stat_stylesheet
2. 但是ngx_rtmp_stat_module 不支持多進(jìn)程。這個(gè)問(wèn)題通過(guò)這個(gè)補(bǔ)丁per-worker-listener優(yōu)化。
步驟:
1. 克隆per-worker-listener : https://github.com/arut/nginx-patches.git?到nginx 目錄下面
2. 打補(bǔ)丁
root@ubuntu2004:/media/code/kaiyuan/openresty-1.19.9.1/bundle/nginx-1.19.9# patch -p1 < per-worker-listener?
root@ubuntu2004:/media/code/kaiyuan/openresty-1.19.9.1/bundle/nginx-1.19.9# patch -p1 < nginx-patches/per-worker-listener patching file src/core/ngx_connection.c Hunk #2 succeeded at 414 (offset 102 lines). Hunk #3 succeeded at 486 (offset 142 lines). Hunk #4 succeeded at 657 with fuzz 1 (offset 190 lines). patching file src/core/ngx_connection.h Hunk #1 succeeded at 57 (offset 3 lines). patching file src/http/ngx_http.c Hunk #1 succeeded at 1769 with fuzz 1 (offset -48 lines). patching file src/http/ngx_http_core_module.c Hunk #1 succeeded at 3920 (offset -106 lines). patching file src/http/ngx_http_core_module.h Hunk #1 FAILED at 72. 1 out of 1 hunk FAILED -- saving rejects to file src/http/ngx_http_core_module.h.rej patching file src/os/unix/ngx_process.c patching file src/os/unix/ngx_process.h Hunk #1 succeeded at 85 (offset 2 lines). patching file src/os/unix/ngx_process_cycle.c Hunk #1 succeeded at 764 with fuzz 2 (offset 27 lines). Hunk #2 FAILED at 972. 1 out of 2 hunks FAILED -- saving rejects to file src/os/unix/ngx_process_cycle.c.rej3?make &make install
總結(jié)
以上是生活随笔為你收集整理的nginx-rtmp 之统计在线clients的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: AAC编码
- 下一篇: PMP之项目相关方管理