Compare commits
3 Commits
a8b63e71c8
...
83fb796a9f
| Author | SHA1 | Date | |
|---|---|---|---|
| 83fb796a9f | |||
| 4efc44e964 | |||
| 3970c60016 |
@@ -24,10 +24,32 @@
|
||||
boot.kernelParams = [ "consoleblank=300" "nmi_watchdog=1" ];
|
||||
|
||||
# Netconsole - stream kernel messages to zippy (192.168.1.2)
|
||||
# Must configure via configfs after network is up (interface doesn't exist at module load)
|
||||
boot.kernelModules = [ "netconsole" ];
|
||||
boot.extraModprobeConfig = ''
|
||||
options netconsole netconsole=@/enp1s0,6666@192.168.1.2/c0:3f:d5:62:55:bb
|
||||
'';
|
||||
boot.kernel.sysctl."kernel.printk" = "8 4 1 7"; # Raise console_loglevel to send all messages
|
||||
systemd.services.netconsole-sender = {
|
||||
description = "Configure netconsole to send kernel messages to zippy";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
TARGET=/sys/kernel/config/netconsole/target1
|
||||
mkdir -p $TARGET
|
||||
# Disable first if already enabled (can't modify params while enabled)
|
||||
if [ -f $TARGET/enabled ] && [ "$(cat $TARGET/enabled)" = "1" ]; then
|
||||
echo 0 > $TARGET/enabled
|
||||
fi
|
||||
echo enp1s0 > $TARGET/dev_name
|
||||
echo 192.168.1.2 > $TARGET/remote_ip
|
||||
echo 6666 > $TARGET/remote_port
|
||||
echo c0:3f:d5:62:55:bb > $TARGET/remote_mac
|
||||
echo 1 > $TARGET/enabled
|
||||
'';
|
||||
};
|
||||
|
||||
# Kdump for kernel crash analysis
|
||||
boot.crashDump = {
|
||||
|
||||
@@ -42,7 +42,7 @@ job "beancount" {
|
||||
}
|
||||
|
||||
resources {
|
||||
memory = 400
|
||||
memory = 600
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user