Skip to content

Instantly share code, notes, and snippets.

@camdenfullmer
Created October 18, 2018 15:23
Show Gist options
  • Save camdenfullmer/a3669aaaac659c38f749c5fb5933857c to your computer and use it in GitHub Desktop.
Save camdenfullmer/a3669aaaac659c38f749c5fb5933857c to your computer and use it in GitHub Desktop.
Collect memory usage from a Docker container into a CSV file
#!/bin/bash
while true; do
docker stats --no-stream --format "{{.MemPerc}}," $1 >> memory_usage.csv;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment