File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,3 +8,35 @@ title: macOS
88On my Varmilo keyboard:
99
1010- ** Win + Alt + Fn + F5** shows the Accessibility Shortcuts menu - useful for enabling Full Keyboard Access when connecting a Bluetooth mouse
11+
12+ ## Unexpected restarts
13+
14+ Some useful commands to investigate why your system restarted:
15+
16+ ``` sh
17+ # Recent reboot history
18+ last reboot | head -10
19+
20+ # Last boot time
21+ who -b
22+
23+ # Power management log — sleep/wake/shutdown events
24+ pmset -g log | grep -E " (Sleep|Wake|Shutdown|Restart|Panic|reboot)" | tail -20
25+
26+ # Shutdown cause codes and kernel panics
27+ pmset -g log | grep -E " (Shutdown Cause|shutdown cause|kernel panic)" | tail -10
28+
29+ # System log search for shutdown/restart/panic events (adjust --last as needed)
30+ log show --last 24h --predicate ' eventMessage contains "shutdown" OR eventMessage contains "restart" OR eventMessage contains "panic"' --style syslog | tail -30
31+
32+ # Recent crash/diagnostic reports (kernel panics, watchdog resets, etc.)
33+ ls -lt ~ /Library/Logs/DiagnosticReports/ | head -10
34+ ls -lt /Library/Logs/DiagnosticReports/ | head -10
35+
36+ # Software update history
37+ softwareupdate --history
38+
39+ # Recent software install history (all apps)
40+ system_profiler SPInstallHistoryDataType | grep -B2 -A3 " Date:"
41+ ```
42+
You can’t perform that action at this time.
0 commit comments