1

I use RTMP server of sys (https://github.com/smartdu/srs)

The log print like this:

[2016-06-26 10:27:00.025][trace][8812][6523] -> 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] -> 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] <- CPB time=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] -> 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] -> 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] <- CPB time=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] -> 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] -> 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] <- CPB time=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] -> 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] -> PLA time=2798050, msgs=24, okbps=1601,1594,1609, ikbps=0,0,0, mw=350

So, what's the items means in the log: 'PLA', 'CPB', 'mr', 'p1stpt', 'pnt', 'mw' and so on.

Thanks for any help!

Winlin
  • 1,136
  • 6
  • 25
guanshan
  • 83
  • 8

1 Answers1

1

The PLA and CPB is short-name that means the log is generated by different clients, for example player or publisher, which make the logs looks better.

For all short names, please search in GitHub repository, like PLA, which is SRS_CONSTS_LOG_PLAY, means a player:

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

SRS use tracable logs for each connection/client, because for live streaming it's very very important to collect logs for a client, from a mix of lots of concurrency client logs. To archive this goal, the tracable log defines as:

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

So it enable us to quickly grep the player whose id is 6487 by:

grep 6487 objs/srs.log

Note that the cid right now is string format, not an increment number, to avoid conflict between servers.

It's really useful for debugging.

Well, about 'mr', 'p1stpt', 'pnt', 'mw', it's also some short-name to make the cycle log looks better, but you MUST take a look for the code, there is no simple answer about them.

Winlin
  • 1,136
  • 6
  • 25