Created
June 11, 2026 19:38
-
-
Save gut5/9505c3409d353c9c9694d137e9b53cf2 to your computer and use it in GitHub Desktop.
linux system health report
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # save as system_check.sh and run with sudo | |
| echo "=== SYSTEM HEALTH REPORT ===" > system_report.txt | |
| echo "Generated: $(date)" >> system_report.txt | |
| echo "" >> system_report.txt | |
| echo "=== BOOT ERRORS (last 3 boots) ===" >> system_report.txt | |
| journalctl -b -p 3..3 --no-pager >> system_report.txt 2>&1 | |
| echo "" >> system_report.txt | |
| echo "=== CURRENT WARNINGS ===" >> system_report.txt | |
| journalctl -b -p 4..4 --no-pager >> system_report.txt 2>&1 | |
| echo "" >> system_report.txt | |
| echo "=== HARDWARE SUMMARY ===" >> system_report.txt | |
| lspci -nn >> system_report.txt 2>&1 | |
| lsusb >> system_report.txt 2>&1 | |
| echo "" >> system_report.txt | |
| echo "=== BLOCK DEVICES ===" >> system_report.txt | |
| lsblk -f >> system_report.txt 2>&1 | |
| echo "" >> system_report.txt | |
| echo "=== GPU STATUS ===" >> system_report.txt | |
| journalctl -b _KERNEL_SUBSYSTEM=drm --no-pager >> system_report.txt 2>&1 | |
| echo "" >> system_report.txt | |
| echo "=== NETWORK STATUS ===" >> system_report.txt | |
| ip link >> system_report.txt 2>&1 | |
| echo "" >> system_report.txt | |
| echo "=== FAILED SERVICES ===" >> system_report.txt | |
| systemctl --failed >> system_report.txt 2>&1 | |
| echo "" >> system_report.txt | |
| echo "=== DISK HEALTH ===" >> system_report.txt | |
| smartctl -H /dev/nvme0 2>/dev/null >> system_report.txt 2>&1 || echo "smartctl not available" >> system_report.txt | |
| echo "" >> system_report.txt | |
| echo "=== THERMAL ZONES ===" >> system_report.txt | |
| cat /sys/class/thermal/thermal_zone*/type 2>/dev/null >> system_report.txt | |
| cat /sys/class/thermal/thermal_zone*/temp 2>/dev/null >> system_report.txt | |
| echo "" >> system_report.txt | |
| echo "Report saved to system_report.txt" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment