A simple shell/AWK script that adds color to
strace output.
Fixes: strace/strace#39
Download somewhere onto your $PATH and make executable:
curl -vL 'https://bit.ly/colorstrace' | sudo tee /usr/local/bin/colorstrace
sudo chmod +x /usr/local/bin/colorstrace# Colorize existing trace
colorstrace < strace.log
# Trace program, colorizing output
colorstrace STRACE_ARGS PROG ARGScolorstrace is line-oriented. The provided color coding is:
- ⬜ white – Highlighted syscalls.
Use
$COLORSTRACEenvironment variable to customize the list of syscalls you are interested in. - ⬛ grey – Normal/boring/verbose syscalls.
- 🟥 red – Syscalls that failed / errored.
- 🟦 cyan – Logging messages from
strace.
Remaining stdout / stderr are left as-is. Feedback most welcome!
