Most Linux distributions ship with the netconsole service, which allows kernel printk() messages to be sent to a remote destination. This feature can be useful for debugging system hangs and panics, and is handy for archiving console messages to a central location. To configure netconsole, you will need to add the IP address of a remote syslog server to /etc/sysconfig/netconsole. Here is a sample entry:
# The IP address of the remote syslog server to send messages to
SYSLOGADDR=192.168.1.5
Once the IP is added to the configuration file, you can start the netconsole service:
$ service netconsole start
Initializing netconsole [ OK ]
$ chkconfig netconsole on
This will load the netconsole kernel module, and write the configuration that was used to the system logs:
Aug 5 13:25:57 disarm netconsole: : inserting netconsole module with arguments
netconsole=6666@192.168.1.6/eth1,514@192.168.1.5/00:24:8C:0B:EB:AB
Aug 5 13:25:57 disarm kernel: netconsole: local port 6666
Aug 5 13:25:57 disarm kernel: netconsole: local IP 192.168.1.6
Aug 5 13:25:57 disarm kernel: netconsole: interface eth1
Aug 5 13:25:57 disarm kernel: netconsole: remote port 514
Aug 5 13:25:57 disarm kernel: netconsole: remote IP 192.168.1.5
Aug 5 13:25:57 disarm kernel: netconsole: remote ethernet address 00:24:8c:0b:eb:ab
Aug 5 13:25:57 disarm kernel: console [netcon0] enabled
Aug 5 13:25:57 disarm kernel: netconsole: network logging started
If the netconsole service starts up successfully, each console message should be routed to the remote syslog server. If you happen to encounter the following error when you try to start the netconsole service:
$ service netconsole start
Initializing netconsole FATAL: Error inserting netconsole
(/lib/modules/2.6.29.5-191.fc11.x86_64/kernel/drivers/net/netconsole.ko): Unknown error 524
[FAILED]
You will need to add the Ethernet interface to the “DEV” variable in the netconsole configuration file (the kernel doesn’t appear to allow bonded or bridged interfaces to work with netconsole, which is one of the drawbacks to using it). I dig netconsole, though it’s no substitute for a properly configured serial console.
I am in the process of setting up a couple of caching DNS servers, and decided to test out djbdns (we used it at my last job with great success). While perusing the web, I came across the life with djbdns site. This site provides a thorough explanation of djbdns, and also covers configuration in detail. If you are interested in learning how djbdns works, this site is for you!
While playing around with initrd images a few weeks back, I came across the mkinitrd “–with” option. This option allows you to add additional modules to an initrd image, which is useful when you have a new storage or Ethernet driver that isn’t supported by the base operating system. To use this option, you can place the names of the modules to add to the initrd image in quotes, and pass them to the “–with” option:
$ mkinitrd -v --with="aoe virtio"
/tmp/initrd/initrd-2.6.29.6-213.fc11.x86_64.img
2.6.29.6-213.fc11.x86_64**
To verify the image contains the modules you specified, you can extract the initrd image and poke around the lib/modules directory:
$ gunzip < initrd-2.6.29.6-213.fc11.x86_64.img | cpio -i
$ cd lib/modules/
$ find . -name aoe ./2.6.29.6-213.fc11.x86_64/aoe.ko
$ find . -name virtio ./2.6.29.6-213.fc11.x86_64/virtio.ko
If you want the modules included in all future mkinitrd runs, you can add the modules to the modules variable in the/etc/sysconfig/initrd file. Nice!
I just came across the open vm tools website. The site hosts the source code to VMWare’s vmtools package, and will be the future home for development surrounding this package. I have encountered a number of issues with vmtools in the past, and the fact that it was closed source made debugging problems difficult. This is exciting news!
I’ve been spending some time reading the source code to the Linux QLogic HBA source code, and got a bit curious about how PCI device data was represented by the kernel. I took a number of notes while reading through the Linux kernel documentation, and summarized them in an article titled Decoding PCI data and lspci output on Linux hosts. If you are interested in learning more about how to decode PCI device-nodes, check out the article.