我使用 sys(https://github.com/smartdu/srs)的 RTMP 服务器
日志打印如下:
[2016-06-26 10:27:00.025] [trace] [8812] [6523]-& gt;PLA time = 3687059,msgs = 22,okbps = 1612,1608,1608,ikbps = 0,0,0,mw = 350
[2016-06-26 10:27:09.906] [trace] [8812] [6523]-& gt;PLA time = 3697060,msgs = 22,okbps = 1611,1608,1608,ikbps = 0,0,0,mw = 350
[2016-06-26 10:27:18.081] [trace] [8812] [6487] & lt;-CPB 时间 = 5860079,okbps = 0,0,0,ikbps = 1641,1614,1610,mr = 0 / 350,p1stpt = 20000,pnt = 20000
[2016-06-26 10:27:19.818] [trace] [8812] [6532]-& gt;PLA time = 2748049,msgs = 4,okbps = 1601,1578,1609,ikbps = 0,0,0,mw = 350
[2016-06-26 10:27:30.149] [trace] [8812] [6514]-& gt;PLA time = 4039065,msgs = 24,okbps = 1614,1575,1609,ikbps = 0,0,0,mw = 350
[2016-06-26 10:27:38.081] [trace] [8812] [6487] & lt;-CPB 时间 = 5880081,okbps = 0,0,0,ikbps = 1641,1629,1610,mr = 0 / 350,p1stpt = 20000,pnt = 20000
[2016-06-26 10:27:39.972] [trace] [8812] [6535]-& gt;PLA time = 1423026,msgs = 21,okbps = 1583,1618,1605,ikbps = 0,0,0,mw = 350
[2016-06-26 10:27:50.003] [trace] [8812] [6535]-& gt;PLA time = 1433026,msgs = 23,okbps = 1584,1558,1605,ikbps = 0,0,0,mw = 350
[2016-06-26 10:27:58.081] [trace] [8812] [6487] & lt;-CPB 时间 = 5900082,okbps = 0,0,0,ikbps = 1640,1563,1610,mr = 0 / 350,p1stpt = 20000,pnt = 20000
[2016-06-26 10:27:59.924] [trace] [8812] [6514]-& gt;PLA time = 4069065,msgs = 20,okbps = 1614,1601,1609,ikbps = 0,0,0,mw = 350
[2016-06-26 10:28:10.118] [trace] [8812] [6532]-& gt;PLA time = 2798050,msgs = 24,okbps = 1601,1594,1609,ikbps = 0,0,0,mw = 350
那么,日志中的项目是什么意思:'PLA','CPB','mr','p1stpt','pnt','mw' 等等。
感谢您的任何帮助!
PLA
和CPB
是短名称,表示日志由不同的客户端(例如播放器或发布者)生成,这使日志看起来更好。
对于所有短名称,请在 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',它也是一些短名称,使循环日志看起来更好,但你必须看看代码,没有关于他们的简单答案。
本站系公益性非盈利分享网址,本文来自用户投稿,不代表边看边学立场,如若转载,请注明出处
评论列表(81条)