Skip to content

Scripts for convenient enabling netconsole kernel ability on Debian Squeeze, Wheezy and Ubuntu

License

Notifications You must be signed in to change notification settings

FastVPSEestiOu/debian_netconsole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

debian_netconsole

Scripts for convenient enabling netconsole kernel feature on Debian 6+, Ubuntu 12.04+ and CentOS 5+.

Features:

Autoconfigure mac address in routed network (you can use gateway address mac automatically or set destination server mac address manually) Script is very simple to configure

Thoroughly tested on LTS distros:

  • AlmaLinux: 8
  • CentOS: 5, 6, 7, 8
  • Debian: 6, 7, 8, 9, 10, 11
  • Rocky: 8
  • Ubuntu: 12.04, 14.04, 16.04, 18.04, 20.04, 22.04, 24.04

Fast install with install.sh script

wget --no-check-certificate https://raw.githubusercontent.com/FastVPSEestiOu/debian_netconsole/master/install.sh -O /tmp/netconsole_install.sh && bash /tmp/netconsole_install.sh && rm --force /tmp/netconsole_install.sh

Manual install

Install guide for sysdemd.service (Debian 8+; Ubuntu 16.04+):

wget https://raw.githubusercontent.com/FastVPSEestiOu/debian_netconsole/master/netconsole_conf -O /etc/default/netconsole --no-check-certificate -q
wget https://raw.githubusercontent.com/FastVPSEestiOu/debian_netconsole/master/netconsole.service -O /etc/systemd/system/netconsole.service --no-check-certificate -q
wget https://raw.githubusercontent.com/FastVPSEestiOu/debian_netconsole/master/netconsole.sh -O /usr/local/bin/netconsole --no-check-certificate -q
chmod +x /usr/local/bin/netconsole
systemctl daemon-reload
systemctl enable netconsole.service
systemctl start netconsole.service

Install guide for init.d script (Debian 6, 7; Ubuntu 12.04, 14.04):

wget --no-check-certificate https://raw.githubusercontent.com/FastVPSEestiOu/debian_netconsole/master/netconsole_conf -O/etc/default/netconsole
wget --no-check-certificate https://raw.githubusercontent.com/FastVPSEestiOu/debian_netconsole/master/netconsole_sysv -O/etc/init.d/netconsole
chmod +x /etc/init.d/netconsole
update-rc.d netconsole defaults
/etc/init.d/netconsole start

Install guide for (AlmaLinux 8; CentOS 6, 7, 8; Rocky 8):

sed -i -e '/^SYSLOGADDR=/d' -e 's|\(# SYSLOGADDR=.*$\)|# SYSLOGADDR=\nSYSLOGADDR=148.251.39.245|g' /etc/sysconfig/netconsole
sed -i -e '/^SYSLOGPORT=/d' -e 's|\(# SYSLOGPORT=.*$\)|\1\nSYSLOGPORT=614|g' /etc/sysconfig/netconsole
chkconfig netconsole on
service netconsole start

NOTE: You will need to change DESTINATION_SERVER_IP in /etc/default/netconsole, if you are using other monitoring server.

Test connection

On the client side:

echo "fastvps_test" > /dev/kmsg 

On the server side:

tcpdump -A 'port 614' 
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on venet0, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
12:13:52.485930 IP XXXX.6666 > fastvps.ee.614: UDP, length 21
E..1....:...X.....'..
.f..iD[275629.843870] fastvps_test

About

Scripts for convenient enabling netconsole kernel ability on Debian Squeeze, Wheezy and Ubuntu

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages