Skip to content

Instantly share code, notes, and snippets.

View iyourshaw's full-sized avatar

Ivan Yourshaw iyourshaw

  • Neaera Consulting
  • Colorado, USA
View GitHub Profile
@iyourshaw
iyourshaw / log_perf.sh
Last active April 3, 2026 19:04
Log CPU usage of containers run with Docker Compose
#!/usr/bin/env bash
# Log performance of containers running in docker
# Repeatedly runs 'docker compose stats' and logs cpu usage to a file
# To be run from a directory containing a docker-compose.yml file while the containers are running.
#
# Prereq:
# docker compose up -d
#
# Usage: