ttyrpld [rusty colors]

 
Name > ttyreplay - realtime log file player
 
Synopsis >

ttyreplay [--no-pctrl] [-F|-f] [-J time|-j packets] [-S factor] [-T] [-m msec] [-t] [-?|--help]

 
Description >

ttyreplay is the tool to see -- to replay -- what has been captured by (the Kernel module and) rpld. Give it any number of files you want to see again. Options apply to all files.

Without any arguments, ttyreplay will try to play STDIN if it is not a tty.

 
Options >
--no-pctrl Disable play control. When play control is enabled, you can pause replaying, skip forwards, raise/lower speed. See below for more.

-F Live feed follow mode. Seek to the end of the file and tail-follow any new contents that are written to it. This does the same as `tail -f` does with normal text logfiles.
-J time Skim to time position before starting to play.
-S factor Plays the file back with a time warp of factor. 1.0 is normal time, 2.0 is twice as fast, 0.5 half speed, etc.
-T Shows (replays) the log without any delays. This can be used to generate a screen log like script or screen (rpl logfile without any packet headers, basically) for easy grepping.
-f Catch-up follow mode. Plays the file back from the start as usual and switches into -F mode when EOF is reached.
-j count Skim count packets before starting to play.
-m msec Set the maximum delay in milliseconds that will be executed between packets. This check is done after the -S option, so -m1000 -S2 will first crunch a delay by factor 2, and then see if it is more than 1 second.
-t Shows the timestamp at the top right corner. Note that this might not work with all terminals, because for one, not all support it, and second, the escape code is currently hardcoded (no terminfo use), so it might just break on the next terminal you try. One -t shows the format "%H:%M:%S" while two -t or a -tt will use "%d/%m %H:%M".
 
Player control >

While ttyreplay is running, you can use the following keys to interactively instruct ttyreplay to do something:

(spacebar) Toggle pause
< (less than) Move to the previous file. Note that this might not work if the previous one was a pipe, STDIN or similar, because such have been "read out".

> (greater than) Move to the next file
y or z Decrease playing speed by factor 1.33. (Playing speeds would be { 0.42 0.56 0.75 1.00 1.33 1.77 2.35 3.12 4.16 5.53 }, relative to normal speed, for example.)
x Normal playing speed
c Increase playing speed by factor 1.33
6 Skip forward 10 seconds
9 Skip forward 60 seconds
q or Ctrl+C Quit

Skipping backwards is not implemented.

 
Example files >

There is an example file I provided, you can watch it with bzip2 -cd Commenting_ovcorr.bz2 | ttyreplay. It shows 1:1 (and in full color!) how I commented the nsleep_ovcorr() function. It is advisable to run it with speed factor 3.0 (-S option) and maximum delay 1 second (-m 1000), because in real-time, it takes approximately 30 minutes thanks to the idleness of the creator ;-)

 
Screenshot >
(Click to enlarge)
 
See also > rpl(4), rpld(8)