【问题标题】:What does 'PLA time' and 'CPB time' mean in SRSSRS中的“PLA时间”和“CPB时间”是什么意思
【发布时间】:2016-06-26 02:32:44
【问题描述】:

我使用 sys 的 RTMP 服务器 (https://github.com/smartdu/srs)

日志打印如下:

[2016-06-26 10:27:00.025][trace][8812][6523] -> PLA 时间=3687059, msgs=22, okbps=1612,1608,1608, ikbps=0,0,0 , 分子量=350

[2016-06-26 10:27:09.906][trace][8812][6523] -> PLA 时间=3697060, msgs=22, okbps=1611,1608,1608, ikbps=0,0,0 , 分子量=350

[2016-06-26 10:27:18.081][trace][8812][6487]

[2016-06-26 10:27:19.818][trace][8812][6532] -> PLA 时间=2748049, msgs=4, okbps=1601,1578,1609, ikbps=0,0,0 , 分子量=350

[2016-06-26 10:27:30.149][trace][8812][6514] -> PLA 时间=4039065,msgs=24,okbps=1614,1575,1609,ikbps=0,0,0 , 分子量=350

[2016-06-26 10:27:38.081][trace][8812][6487]

[2016-06-26 10:27:39.972][trace][8812][6535] -> PLA 时间=1423026, msgs=21, okbps=1583,1618,1605, ikbps=0,0,0 , 分子量=350

[2016-06-26 10:27:50.003][trace][8812][6535] -> PLA 时间=1433026, msgs=23, okbps=1584,1558,1605, ikbps=0,0,0 , 分子量=350

[2016-06-26 10:27:58.081][trace][8812][6487]

[2016-06-26 10:27:59.924][trace][8812][6514] -> PLA 时间=4069065,msgs=20,okbps=1614,1601,1609,ikbps=0,0,0 , 分子量=350

[2016-06-26 10:28:10.118][trace][8812][6532] -> PLA 时间=2798050, msgs=24, okbps=1601,1594,1609, ikbps=0,0,0 , 分子量=350

那么,日志中的项目是什么意思:'PLA'、'CPB'、'mr'、'p1stpt'、'pnt'、'mw'等等。

感谢您的帮助!

【问题讨论】:

    标签: rtmp sys simple-realtime-server


    【解决方案1】:

    PLACPB 是短名称,表示日志由不同的客户端生成,例如播放器或发布者,这使日志看起来更好。

    所有简称请在GitHub仓库中搜索,如PLA,即SRS_CONSTS_LOG_PLAY,表示玩家:

    trunk/src/kernel/srs_kernel_consts.hpp
    // Play stream on edge/origin.
    #define SRS_CONSTS_LOG_PLAY "PLA"
    

    SRS 为每个连接/客户端使用可追踪日志,因为对于实时流式传输,从大量并发客户端日志的混合中收集客户端日志非常重要。为了归档这个目标,可追踪日志定义为:

    [         time          ] [level] [pid]  [ cid ] Message.
    [2016-06-26 10:27:18.081] [trace] [8812] [6487]  -> PLA time=3687059
    

    所以它使我们能够通过以下方式快速 grep id 为 6487 的玩家:

    grep 6487 objs/srs.log
    

    请注意,现在的 cid 是字符串格式,而不是增量数字,以避免服务器之间的冲突。

    对调试非常有用。

    嗯,关于'mr', 'p1stpt', 'pnt', 'mw',也是一些让循环日志看起来更好看的简称,但是你一定要看看代码,关于它们没有简单的答案。

    【讨论】:

      猜你喜欢
      • 2012-03-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-20
      • 2012-08-17
      相关资源
      最近更新 更多