Update docs and screenshots
CI / backend (pull_request) Canceled after 0s
CI / shell (pull_request) Canceled after 0s
CI / frontend (pull_request) Canceled after 0s
CI / arm64-smoke (pull_request) Canceled after 0s
CI / backend (push) Canceled after 0s
CI / shell (push) Canceled after 0s
CI / frontend (push) Canceled after 0s
CI / arm64-smoke (push) Canceled after 0s
CI / backend (pull_request) Canceled after 0s
CI / shell (pull_request) Canceled after 0s
CI / frontend (pull_request) Canceled after 0s
CI / arm64-smoke (pull_request) Canceled after 0s
CI / backend (push) Canceled after 0s
CI / shell (push) Canceled after 0s
CI / frontend (push) Canceled after 0s
CI / arm64-smoke (push) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
OUT_DIR="${1:-./data/diagnostics}"
|
||||
STAMP="$(date +%Y%m%d-%H%M%S)"
|
||||
WORK_DIR="$OUT_DIR/tuxdmx-diagnostics-$STAMP"
|
||||
ARCHIVE="$OUT_DIR/tuxdmx-diagnostics-$STAMP.tar.gz"
|
||||
ENV_FILE="/etc/tuxdmx/tuxdmx.env"
|
||||
DB_FILE="/var/lib/tuxdmx/tuxdmx.db"
|
||||
|
||||
mkdir -p "$WORK_DIR"
|
||||
|
||||
systemctl status olad tuxdmx.service >"$WORK_DIR/service-status.txt" 2>&1 || true
|
||||
journalctl -u olad -u tuxdmx.service -n 500 >"$WORK_DIR/journal.txt" 2>&1 || true
|
||||
lsusb >"$WORK_DIR/lsusb.txt" 2>&1 || true
|
||||
dmesg | grep -Ei "usb|tty|ola|audio" >"$WORK_DIR/dmesg-filtered.txt" 2>&1 || true
|
||||
uname -a >"$WORK_DIR/os.txt"
|
||||
python3 --version >"$WORK_DIR/python-version.txt" 2>&1 || true
|
||||
python3 -m pip freeze >"$WORK_DIR/python-packages.txt" 2>&1 || true
|
||||
ip addr >"$WORK_DIR/network.txt" 2>&1 || true
|
||||
arecord -l >"$WORK_DIR/audio.txt" 2>&1 || true
|
||||
curl -fsS http://127.0.0.1:8000/api/v1/system/diagnostics >"$WORK_DIR/api-diagnostics.json" 2>&1 || true
|
||||
|
||||
if [[ -f "$ENV_FILE" ]]; then
|
||||
sed -E 's/(SECRET_KEY|TOKEN|PASSWORD)=.*/\1=<redacted>/g' "$ENV_FILE" >"$WORK_DIR/tuxdmx-env.redacted"
|
||||
fi
|
||||
|
||||
if [[ -f "$DB_FILE" ]]; then
|
||||
sqlite3 "$DB_FILE" "PRAGMA integrity_check;" >"$WORK_DIR/sqlite-integrity.txt" 2>&1 || true
|
||||
fi
|
||||
|
||||
tar -czf "$ARCHIVE" -C "$OUT_DIR" "tuxdmx-diagnostics-$STAMP"
|
||||
echo "Diagnostics skrevet til $ARCHIVE"
|
||||
Reference in New Issue
Block a user