diff --git a/README.md b/README.md index 153446c..60b9344 100755 --- a/README.md +++ b/README.md @@ -313,6 +313,12 @@ mkdir empty && rsync -r --delete empty/ some-dir && rmdir some-dir ## System debugging +- To log your session, open a subshell using `script [] [-T ]`. This starts logging of all input and output from your terminal session to `log_file` (`typescript` by default), along with optional timing information to `timing_file`. End the session using `exit`. + +- View the script logging file using `less -r `, which will handle color codes and other raw characters. You can replay a script with timings using `scriptreplay -t `. + +- You can augment your prompt to show when you are recording within a `script` subshell by adding the following to your `.bashrc` file: `lsof -tac script "$(tty)" > /dev/null && PS1="[recording] $PS1"` + - For web debugging, `curl` and `curl -I` are handy, or their `wget` equivalents, or the more modern [`httpie`](https://github.com/jkbrzt/httpie). - To know current cpu/disk status, the classic tools are `top` (or the better `htop`), `iostat`, and `iotop`. Use `iostat -mxz 15` for basic CPU and detailed per-partition disk stats and performance insight.