You are here: Configuration File > Server-Side Rate Control Configuration > Rate Control Logs > Rate Manager Debugging Log

Rate Manager Debugging Log

When debugging output is enabled, Helix Mobile Server generates a rate manager log file for each RTSP session that uses server-side rate control. The log is a text file written to the main Helix Mobile Server installation directory. It uses the following naming convention:

ratemgr_SessionID-CSeq_StreamID.txt

The following are the file name components:

SessionID is the string used to identify the RTSP connection. Helix Mobile Server starts this value at a random number on each system restart, and increments the value by 1 for each new RTSP session.

The CSeq is taken from the RTSP request on which the session was established.

StreamID is a number assigned to each stream. An audio stream may have the StreamID of 10, for example, while the corresponding video stream may be 11.

The following is an example of a rate manager log file:

ratemgr_1354694621-2_11.txt

Tip: You can create a customized logging report that cross-references an RTSP session's SessionID property with information such as the media player type, IP address, requested content, and so on.

Rate Manager Header Information

A rate manager log file begins with header entries that represent the configuration information relevant to the session:

PreDecodeBufferSize: bytes
PreDecodeBufferPeriod: milliseconds
BufferLowWaterMark: milliseconds
BufferHiWaterMark: milliseconds

The following sections explain the meanings of these header fields.

PreDecodeBufferSize
PreDecodeBufferPeriod
BufferLowWaterMark
BufferHiWaterMark

Rate Manager Statistics

Following the header information, the rate manager debugging file lists the status of the server's buffer model throughout the streaming session. Each line in the file indicates a separate action that Helix Mobile Server performed with the buffer model. All entries include a time value that tells when the action occurred relative to the start of the RTSP session.

Preroll Period
Decoding State
Queued Packets

Evicted and Expired Packets

The Evicted_packet or Expired_Packet action occurs when a packet leaves the buffer to be rendered:

Evicted_packet

Packet is known to have been rendered based on client feedback.

Expired_packet

Packet is assumed to have been rendered. This action is logged only with clients that provide NADU feedback.

The format for an evicted or expired packet is the same as that for a queued packet, except that it has no buffdepth entry. In the following example, the current playback time (190 milliseconds) is greater than the packet's timestamp (167 milliseconds), meaning that the packet data has been decoded:

1360 decode 190 11 Evicted_packet seq=2 ts=167 size=19 -> buffsize=11152

The buffer size information indicates the resulting buffer size in bytes (11152) after this packet has been removed.

Blocked Stream

The Stream_blocked action indicates that transmission is blocked because the buffer is full. In the following example, the block occurs at playback time 15203, with the packet timestamp at 12563. The retry field indicates the number of milliseconds the server waits for the buffer depth to drop before retransmitting the packet:

15203 decode 10528 0 Stream_blocked seq=25 ts=12563 size=563  buffsize=40397 
retry=300

When the block occurred, the buffer contained 40397 bytes of data. Assuming that the maximum buffer size is 40952 bytes (this is reported in the log header), the buffer has 555 free bytes. This is not enough room for a 563-byte packet.

Note: When a stream is blocked, Helix Mobile Server limits its delivery rate to the actual media rate.

NADU Feedback

The NADU_Feedback action means that the buffer model has received NADU feedback. The feedback packet information is logged using the following format:

ElapsedTime  State  QueueTime  StreamID  Action  Delay  NSN  NUN  FBS  HSNR
        
16345 decode 11729 0 NADU_Feedback playout_delay=4526 NSN=32 NUN=34 FBS=72 (4608)
HSNR=40

These fields provide the following information:

ElapsedTime

The time in milliseconds since the start of the streaming session.

State

The current state of the buffer model:
init—initializing the session
predecode—fulfilling preroll requirements
decode—decoding and playing the stream

QueueTime

The point in the stream timeline, in milliseconds, that was being rendered when the NADU feedback packet was generated.

StreamID

The same assigned, numeric stream ID used in the file name.

Action

The packet action (NADU_Feedback).

Delay

The number of milliseconds before the packet with the next sequence number will play. This is expressed in the format playout_delay=n.

NSN

Sequence number of the next packet to be decoded, expressed in the format NSN=n.

NUN

Unit number of the next ADU to be decoded, expressed in the format NUN=n.

FBS

Free buffer space expressed in the format FBS=n (b), in which n is the number of 64 byte blocks, and b is the number of bytes (b = n x 64).

HSNR

Highest sequence number so far of a received packet, expressed in the format HSNR=n.

In the following example, the NADU feedback indicates that the playout delay is 4526 milliseconds, the sequence number of the next packet to be decoded is 32, the amount of free space in the buffer is 4608 bytes (which NADU reports as 72 x 64 byte blocks). The next unit number is reported as unit 34, and the highest sequence number on a packet received so far is 40:

16345 decode 11729 0 NADU_Feedback playout_delay=4526 NSN=32 NUN=34 FBS=72 (4608) 
HSNR=40

Rate Shifting

The UpShift action indicates that an upshift request was made. In the following example, the rate manager requested an upshift at playback time 16727:

16727 UpShift

The DownShift action means that a downshift request was made. In the following example, the rate manager requested a downshift at playback time 20344:

20344 DownShift

Note: The rate manager log does not indicate if the upshift or downshift actually occurred.

 


Helix Universal Mobile Server Version 14.2 Online Help
Revision Date: Tuesday, March 15, 2011
©2011 RealNetworks, Inc., http://www.realnetworks.com