Skip to content

How to Use SAI Player

Kamil Cudnik edited this page Apr 27, 2017 · 7 revisions

Sonic is equipped with saiplayer tool. When orchestration agent starts, it start recording each SAI operation to recording file in format sairedis.YYYY-MM-DD.HH:MM:SS.MS.rec. This file contains each SAI ASIC operation (one per line) as well as SAI notifications and sairedis control messages (like init view and apply view).

This tool can be used to "replay" recoding on ASCI without orchestration agent. There is no need for waiting for "event" to happen, each operation is already recorded and it will be replayed with maximum possible speed. This can be very helpful when reproducing bugs. One team can find a bug, and then send recording to vendor for investigation.

This tool is very fragile, and it assumes that object IDs between ASIC reinitialize are stable and don't change. Also it should be used on the same SAI vendor SDK version to work.

Here is possible scenario:

  1. bug is spotted, ASIC is not configured as expected
  2. take recording file *.rec
  3. stop all sonic processes and clean the redis DB for fresh start
  4. replay recodring using command "sayplayer sairedis.xxx.rec"
  5. confirm that ASIC is in bad state as found in the first place
  6. describe what the problem is and send recoding file to vendor for investigation
Clone this wiki locally