Add log collection scripts for breezy gnome, kwin, and vulkan (#159)
This commit is contained in:
parent
ce7a5c378d
commit
73b4d72140
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# exit when any command fails
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$(id -u)" == "0" ]; then
|
||||||
|
echo "This script must not be run as root" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
|
||||||
|
|
||||||
|
# Create a temp directory to gather logs
|
||||||
|
tmp_dir=$(mktemp -d -t breezy-gnome-logs-XXXXXXXXXX)
|
||||||
|
echo "Gathering logs into temp directory: ${tmp_dir}"
|
||||||
|
|
||||||
|
mkdir -p "$tmp_dir/breezy_gnome_logs"
|
||||||
|
|
||||||
|
# Copy gnome logs
|
||||||
|
if [ -d "$XDG_STATE_HOME/breezy_gnome/logs" ]; then
|
||||||
|
cp -r "$XDG_STATE_HOME/breezy_gnome/logs" "$tmp_dir/breezy_gnome_logs/breezy_gnome"
|
||||||
|
else
|
||||||
|
echo "Warning: Breezy GNOME logs not found at $XDG_STATE_HOME/breezy_gnome/logs"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create archive
|
||||||
|
archive_name="breezy_gnome_logs_$(date +%Y%m%d_%H%M%S).tar.gz"
|
||||||
|
tar -czf "$archive_name" -C "$tmp_dir" breezy_gnome_logs
|
||||||
|
echo "Created log archive: $(pwd)/$archive_name"
|
||||||
|
|
||||||
|
rm -rf "$tmp_dir"
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# exit when any command fails
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$(id -u)" == "0" ]; then
|
||||||
|
echo "This script must not be run as root" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create a temp directory to gather logs
|
||||||
|
tmp_dir=$(mktemp -d -t breezy-kwin-logs-XXXXXXXXXX)
|
||||||
|
echo "Gathering logs into temp directory: ${tmp_dir}"
|
||||||
|
|
||||||
|
mkdir -p "$tmp_dir/breezy_kwin_logs"
|
||||||
|
|
||||||
|
# Collect journalctl logs
|
||||||
|
if command -v journalctl &>/dev/null; then
|
||||||
|
journalctl -p warning --since "24 hours ago" > "$tmp_dir/breezy_kwin_logs/journalctl_warnings.log" 2>/dev/null || \
|
||||||
|
echo "Warning: Failed to collect journalctl warning logs"
|
||||||
|
journalctl --grep breezy --since "24 hours ago" > "$tmp_dir/breezy_kwin_logs/journalctl_breezy.log" 2>/dev/null || \
|
||||||
|
echo "Warning: Failed to collect journalctl breezy logs"
|
||||||
|
else
|
||||||
|
echo "Warning: journalctl not found, skipping journal logs"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create archive
|
||||||
|
archive_name="breezy_kwin_logs_$(date +%Y%m%d_%H%M%S).tar.gz"
|
||||||
|
tar -czf "$archive_name" -C "$tmp_dir" breezy_kwin_logs
|
||||||
|
echo "Created log archive: $(pwd)/$archive_name"
|
||||||
|
|
||||||
|
rm -rf "$tmp_dir"
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# exit when any command fails
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$(id -u)" == "0" ]; then
|
||||||
|
echo "This script must not be run as root" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create a temp directory to gather logs
|
||||||
|
tmp_dir=$(mktemp -d -t breezy-vulkan-logs-XXXXXXXXXX)
|
||||||
|
echo "Gathering logs into temp directory: ${tmp_dir}"
|
||||||
|
|
||||||
|
mkdir -p "$tmp_dir/breezy_vulkan_logs"
|
||||||
|
|
||||||
|
# Copy Decky XRGaming logs
|
||||||
|
if [ -d "$HOME/homebrew/logs/decky-XRGaming" ]; then
|
||||||
|
cp -r "$HOME/homebrew/logs/decky-XRGaming" "$tmp_dir/breezy_vulkan_logs/decky-XRGaming"
|
||||||
|
else
|
||||||
|
echo "Warning: Decky XRGaming logs not found at $HOME/homebrew/logs/decky-XRGaming"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Collect journalctl logs
|
||||||
|
if command -v journalctl &>/dev/null; then
|
||||||
|
journalctl --grep gamescope --since "24 hours ago" > "$tmp_dir/breezy_vulkan_logs/journalctl_gamescope.log" 2>/dev/null || \
|
||||||
|
echo "Warning: Failed to collect journalctl gamescope logs"
|
||||||
|
else
|
||||||
|
echo "Warning: journalctl not found, skipping journal logs"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create archive
|
||||||
|
archive_name="breezy_vulkan_logs_$(date +%Y%m%d_%H%M%S).tar.gz"
|
||||||
|
tar -czf "$archive_name" -C "$tmp_dir" breezy_vulkan_logs
|
||||||
|
echo "Created log archive: $(pwd)/$archive_name"
|
||||||
|
|
||||||
|
rm -rf "$tmp_dir"
|
||||||
Loading…
Reference in New Issue