Add stability debugging for beefy lockups.
- Add netconsole receiver on zippy to capture kernel messages - Configure beefy as netconsole sender to zippy (192.168.1.2) - Enable kdump with 256M reserved memory for crash analysis - Add lockup detectors (softlockup_panic, hung_task_panic, nmi_watchdog) - Add consoleblank=300 for greeter display sleep - Persist crash dumps and add analysis tools (crash, makedumpfile) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
{ pkgs, inputs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../common/encrypted-btrfs-layout.nix
|
||||
@@ -19,6 +19,38 @@
|
||||
networking.cluster.primaryInterface = "enp1s0";
|
||||
services.tailscaleAutoconnect.authkey = "tskey-auth-k79UsDTw2v11CNTRL-oYqji35BE9c7CqM89Dzs9cBF14PmqYsi";
|
||||
|
||||
# Enable all SysRq functions for debugging hangs
|
||||
boot.kernel.sysctl."kernel.sysrq" = 1;
|
||||
# Console blanking after 5 minutes (for greeter display sleep)
|
||||
# NMI watchdog for hardlockup detection
|
||||
boot.kernelParams = [ "consoleblank=300" "nmi_watchdog=1" ];
|
||||
|
||||
# Netconsole - stream kernel messages to zippy (192.168.1.2)
|
||||
boot.kernelModules = [ "netconsole" ];
|
||||
boot.extraModprobeConfig = ''
|
||||
options netconsole netconsole=@/enp1s0,6666@192.168.1.2/c0:3f:d5:62:55:bb
|
||||
'';
|
||||
|
||||
# Kdump for kernel crash analysis
|
||||
boot.crashDump = {
|
||||
enable = true;
|
||||
reservedMemory = "256M";
|
||||
};
|
||||
|
||||
# Lockup detectors - panic on detection so kdump captures state
|
||||
boot.kernel.sysctl = {
|
||||
# Enable all SysRq functions for debugging hangs
|
||||
"kernel.sysrq" = 1;
|
||||
# Panic on soft lockup (CPU not scheduling for >20s)
|
||||
"kernel.softlockup_panic" = 1;
|
||||
# Panic on hung tasks (blocked >120s)
|
||||
"kernel.hung_task_panic" = 1;
|
||||
"kernel.hung_task_timeout_secs" = 120;
|
||||
};
|
||||
|
||||
# Persist crash dumps
|
||||
environment.persistence.${config.custom.impermanence.persistPath}.directories = [
|
||||
"/var/crash"
|
||||
];
|
||||
|
||||
# Crash analysis tools
|
||||
environment.systemPackages = with pkgs; [ crash makedumpfile ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user