Skip to content

kernc/colorstrace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

colorstrace - add color to strace output

Build status Language: shell / Bash / AWK Source lines of code Script size

A simple shell/AWK script that adds color to strace output.

Fixes: strace/strace#39

Installation

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

Usage

# Colorize existing trace
colorstrace < strace.log

# Trace program, colorizing output
colorstrace STRACE_ARGS PROG ARGS

Colors

colorstrace is line-oriented. The provided color coding is:

  • ⬜ white – Highlighted syscalls. Use $COLORSTRACE environment 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!

Example

screenshot