Skip to content

NitroAMD/strace-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Strace Analyzer

A web application that analyzes Linux strace output files to detect CPU throttling and visualize syscall timelines with interactive Plotly charts.

What It Does

Upload an strace file and get:

  • CPU throttle detection identifies when syscalls are abnormally slow (5x+ their median duration)
  • Uniform throttle detection detects when all fast syscalls are uniformly slower than expected (common in containers with CPU limits)
  • Interactive Gantt chart timeline visualization of all syscalls per process, color-coded with throttle indicators
  • Statistics per-PID runtime, syscall counts, CPU time totals, and worst-offender rankings

Architecture

 parse.py                  # Original CLI analysis script
 webapp/
    app.py                # Flask web app (wraps parse.py logic)
    templates/
       index.html        # Upload page (drag-and-drop)
       results.html      # Results page (stats + Plotly chart)
    requirements.txt      # Python dependencies
    Dockerfile            # Container image for deployment
    .dockerignore
    deploy-azure.sh       # One-command Azure deployment script
 .gitignore

Running Locally

CLI (original script)

python parse.py <strace_file> [output.html]

Web App

cd webapp
pip install -r requirements.txt
python app.py
# Open http://localhost:8000

Deployed on Azure

The web app runs on Azure App Service (Linux container) with Microsoft Entra ID authentication.

Resource Details
Resource Group rg-<your-name>
Container Registry acr<your-name> (Basic)
App Service Plan plan-<your-name> (B1, Linux)
Web App <your-app-name>
Auth Entra ID (Easy Auth, single-tenant)

The deploy-azure.sh script creates all resources with randomized names automatically.

Redeploying

cd webapp
az acr build --registry <your-acr> --image strace-analyzer:latest --file Dockerfile .
az webapp restart --name <your-app> --resource-group <your-rg>

Collecting strace Data

To capture strace output suitable for analysis:

strace -f -ttt -T -e trace=all -o app.strace ./your-app

Key flags:

  • -f follow child processes
  • -ttt absolute timestamps with microseconds
  • -T show syscall duration in angle brackets
  • -e trace=all capture all syscall types

Dependencies

  • Python 3.11+
  • Flask
  • Plotly
  • stracetools strace parsing, analysis, and visualization
  • Gunicorn (production server)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors