Browse Source

new: [0km] add flag -n nextcloud size and -d docker system size in vps-space

Boris Gallet 3 months ago
parent
commit
84e266f6d0
  1. 27
      bin/0km

27
bin/0km

@ -1397,8 +1397,35 @@ cmdline.spec::cmd:vps-space:run() {
: :posarg: [VPS...] 'Target host(s) to check'
: :optfla: --nextcloud,-n 'target space used by nextcloud and total size of trashfiles'
: :optfla: --docker,-d 'target space used by docker'
echo "df /srv -h | tail -n +2 | sed -r 's/ +/ /g' | cut -f 2-5 -d ' '" |
vps_mux vps_bash "${VPS[@]}"
if [ -n "$opt_nextcloud" ]; then
echo "
NEXTCLOUD_TRASH_DIR=\"/srv/datastore/data/nextcloud/var/lib/nextcloud/data/*/files_trashbin\"
echo \"---- Nextcloud data size : \"
du -sh /srv/datastore/data/nextcloud/
echo \"---- Nextcloud thrashbin files size (MB) : \"
du -sk /srv/datastore/data/nextcloud/var/lib/nextcloud/data/*/files_trashbin | awk '{sum += \$1} END {print sum / 1024}'
echo \"---- Trashbin group files (MB) : \"
du -sk /srv/datastore/data/nextcloud/var/lib/nextcloud/data/*/files_trashbin/* | awk '{sum += \$1} END {print sum / 1024}'
" |
vps_mux vps_bash "${VPS[@]}"
fi
if [ -n "$opt_docker" ]; then
echo "
echo \"---- Docker sytem disk usage ---- \"
docker system df
echo \"---- Docker containers logs size : \"
du -h max-depth=1 /var/lib/docker/containers/* | sort -h
" |
vps_mux vps_bash "${VPS[@]}"
fi
}

Loading…
Cancel
Save