Skip to content

Instantly share code, notes, and snippets.

@zakkg3
Created July 24, 2018 13:56
Show Gist options
  • Save zakkg3/92def655d0ced6663f1ea4f40bafae97 to your computer and use it in GitHub Desktop.
Save zakkg3/92def655d0ced6663f1ea4f40bafae97 to your computer and use it in GitHub Desktop.
write celery docker memory stat to a file every 5 mins
#!/bin/bash
while true
do
(echo -n $(date)" " && docker stats --no-stream | grep $(docker ps | grep celery | tr -s ' ' | cut -d' ' -f1 ) | tr -s ' ' | cut -d' ' -f3) >> ~/celerystats
sleep 300
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment