Skip to content

Instantly share code, notes, and snippets.

View shivanimmagadda's full-sized avatar
💭
I may be slow to respond.

Shiva shivanimmagadda

💭
I may be slow to respond.
  • Atlanta
View GitHub Profile
@robsonke
robsonke / checkDockerDisks.sh
Last active February 18, 2024 12:44
This Bash script will loop through all running docker containers on a host and list the disk usage per mount. In case it's breaching the 65%, it will email you.
#!/bin/bash
# get all running docker container names
containers=$(sudo docker ps | awk '{if(NR>1) print $NF}')
host=$(hostname)
# loop through all containers
for container in $containers
do
echo "Container: $container"