Skip to content

Instantly share code, notes, and snippets.

View xbucks's full-sized avatar
✌️
Go my own way

Quan Doan xbucks

✌️
Go my own way
View GitHub Profile
@xbucks
xbucks / checkDockerDisks.sh
Created March 1, 2019 03:19 — forked from robsonke/checkDockerDisks.sh
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"