02.ANALYST LOGGING

root@oco:~$ script --t=scriptTimingFile.$$ -af scriptFile.$$
 * the --t option specifies the timing data
 * the "scriptTimingFile.$$" file contains the timing data
 
 * -a means append to the log file
 * -f means run flush the output of the file after each write  in real-time
    - Without -f, the output might be buffered, meaning it could be written to the file in chunks rather than immediately.

 * the "scriptFile.$$" file contains input & output data

 * the $$ is a special shell variable that expands to the process ID (PID) of the currently running shell
    - the $$ ensures that the filename is unique for each script session

  * use Ctrl-D to end and save the file

root@oco:~$ cat scriptTimingFile.{PID}
root@oco:~$ cat scriptFile.{PID}

#ONLY USE BELOW CMD FOR REPLAY
root@oco:~$ scriptreplay --timing=scriptTimingFile.{PID} scriptFile.{PID}

Last updated