This standardization makes it somewhat easier to read stacktraces as the command names are all uniform, so it will be slightly easier to scan trace output.
35 lines
1.0 KiB
Bash
Executable File
35 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
|
|
cmd-report() {
|
|
declare desc="reports dokku vitals for troubleshooting"
|
|
local cmd="report"
|
|
declare APP="$2"
|
|
|
|
dokku_log_info1 "uname: $(uname -a)"
|
|
dokku_log_info1 "memory: "
|
|
free -m | sed "s/^/ /"
|
|
dokku_log_info1 "docker version: "
|
|
"$DOCKER_BIN" version | sed "s/^/ /"
|
|
dokku_log_info1 "docker daemon info: "
|
|
"$DOCKER_BIN" -D system info | sed "s/^/ /"
|
|
dokku_log_info1 "sigil version: $(sigil -v)"
|
|
dokku_log_info1 "herokuish version: "
|
|
"$DOCKER_BIN" container run $DOKKU_GLOBAL_RUN_ARGS --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
|
|
dokku_log_info1 "dokku version: $(dokku version)"
|
|
dokku_log_info1 "dokku plugins: "
|
|
dokku plugin:list | sed "s/^/ /"
|
|
|
|
if [[ "$APP" == "--all" ]]; then
|
|
for app in $(dokku_apps); do
|
|
plugn trigger report "$app"
|
|
done
|
|
elif [[ -n "$APP" ]]; then
|
|
plugn trigger report "$APP"
|
|
fi
|
|
}
|
|
|
|
cmd-report "$@"
|