Skip to content

Repository files navigation

atop-flame logo

atop-flame

Reads atop -P output from stdin and renders flame-style charts for every metric category present in the stream — CPU, memory, disk, network, GPU, devices, and system summary. Unknown / malformed lines are silently ignored; sections without data are skipped entirely.

Install

The fastest way — fetches and builds a tagged release into $GOBIN (or $HOME/go/bin):

go install github.com/rachlenko/atop-flame@latest          # latest tag
go install github.com/rachlenko/atop-flame@v0.0.2          # a specific tag

--version reports the installed semver tag automatically (read from the binary's embedded module info).

Build from source

git clone https://github.com/rachlenko/atop-flame
cd atop-flame
make build            # writes .bin/atop-flame using vendored deps
# or, plain Go:
go build -o atop-flame .

Prebuilt binaries

See the Releases page for static binaries for linux/darwin × amd64/arm64.

Docker

docker pull ghcr.io/rachlenko/atop-flame:latest
atop -P ALL | docker run --rm -i ghcr.io/rachlenko/atop-flame:latest

Usage

# terminal (colored ASCII bars)
atop -P PRC | ./atop-flame

# from a recorded log file, 10-minute window
atop -r /var/log/atop/atop_$(date +%Y%m%d) \
     -b $(date -d '10 minutes ago' '+%H:%M') \
     -e $(date '+%H:%M') \
     -P PRC | ./atop-flame

# HTML chart, written to ./atop-flame.html
atop -P PRC | ./atop-flame --html-output

# HTML chart, open in firefox
atop -P PRC | ./atop-flame --html-output --browser firefox

# show top 50 processes
atop -P PRC | ./atop-flame --top 50

# help / version
./atop-flame --help
./atop-flame --version

Flags

Flag Description
--help show help and exit
--version show version and exit
--html-output render HTML chart to ./atop-flame.html
--browser PATH browser executable to open the HTML file in (omit to just write the file)
--top N show top N processes by CPU ticks (default: 30)

Documentation

The long-form docs live under docs/ and are built with Zensical, a Rust + Python static site generator from the Material for MkDocs team:

python3 -m venv .venv && source .venv/bin/activate
pip install zensical
zensical serve           # http://localhost:8000
zensical build           # writes site/ for deployment

Pages:

Zensical is pre-1.0; if config keys in zensical.toml get renamed upstream, update them per the Zensical docs before re-running.

Dependencies

Integration with freeze detection

Add this to any process before it might freeze, to leave a CPU snapshot in the log:

atop -r /var/log/atop/atop_$(date +%Y%m%d) \
     -b $(date -d '10 minutes ago' '+%H:%M') \
     -e $(date '+%H:%M') \
     -P PRC | ./atop-flame >> /var/log/pre-freeze-snapshot.log

About

cli utility takes output from atop and draw flame charts in cli or html format

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages