This page is part of the debugging series — pages with debugging details for a variety of Ubuntu packages. |
Contents
- Setup netconsole
- Step 1: Determine remote mac address
- Step 2: Change kernel options at boot time
- Step 4: Setup receiver
- Remove netconsole
- Revert Grub to its original configuration
Sometimes it's hard to capture a kernel panic: You don't know how to reproduce the kernel panic and/or once you have rebooted your system, there are no clues in the logfiles. This is where netconsole might help out. Netconsole is a kernel module that logs kernel printk messages over UDP allowing debugging of problems where disk logging fails. This is just a techno-way of saying that the kernel messages will get sent over the network in certain packets (UDP packets).
There are a couple of disadvantages though:
Good Luck Sock Men's Santa on a Sled Christmas Socks - Green, Shoe Size 7-12 4.2 out of 5 stars 15. Good Luck Sock Men's Christmas Sweater Dinosaurs Socks.
- For buying even older versions of Mac OS X, you may have some luck searching on Amazon or Ebay and buying old physical copies of the installer disks. Keep in mind those earlier Mac OS X software updates used to cost a significant amount of money to update to and so even if they’re hold they can still carry a premium.
- Get reviews, hours, directions, coupons and more for Good Luck Tattoo at 1011 41st Ave, Santa Cruz, CA 95062. Search for other Tattoos in Santa Cruz on The Real Yellow Pages®.
- Get more done with the new Google Chrome. A more simple, secure, and faster web browser than ever, with Google’s smarts built-in.
- Since netconsole needs to send its UDP packets to some other host, you need to setup a 'receiver' as well
- Netconsole initializes when modules are loaded into the kernel. This doesn't allow capture of early kernel panics - for example when booting
- The driver for the network card must support polling (netpoll api)
- Only IP networks, UDP packets and ethernet devices are supported
This document will guide you through the steps to setup netconsole for Ubuntu {*}.
There are 5 steps to set it all up! Good luck!
Step 1: Determine remote mac address
We need to know a mac address where the UDP packets will get sent to (also known as the 'receiver'). This 'receiver' can or can't be in the same subnet:
When 'receiver' is in same subnet
In this example I would like to send the UDP packets to 192.168.1.103 (which is in the same subnet as the sender is).
In this example 08:00:46:d4:1d:82 is the mac address we need.
When 'receiver' isn't in the same subnet
Okay, when that's the case, you need to determine the default gateway first:
In this case, that's 192.168.1.1.
Now, we need to figure out which mac address our default gateway has:
Good Luck Santa Mac Os X
In this example 00:0f:66:5b:2a:3c is the mac address we need.
Step 2: Change kernel options at boot time
Okay, let's assume you use grub as your bootloader. In this case grub will boot the kernel with (at least) the 'quiet splash' options by default. We don't want that.
Grub 2 instructions
Just to be sure, create a backup of /etc/default/grub first: Rara project mac os.
Now, open your favorite editor to edit /etc/default/grub.
- For vi:
- For gedit (to edit this file within Gnome):
Locate the line GRUB_CMDLINE_LINUX_DEFAULT='quiet splash' and replace this line with GRUB_CMDLINE_LINUX_DEFAULT='debug ignore_loglevel'.
Tell grub to update accordingly:
Step 3: Initialize netconsole at boot time
Okay, that went well. Three more steps to go!
Now we need to know the:
- ip address and interface of the 'sender' (use the following commands to determine these)
- ip address and mac address of the 'receiver' (these were already gathered in #Step 1: Determine remote mac address)
In the following example, the part that starts with 'netconsole=' is setup like this:
netconsole=<LOCAL_PORT>@<SENDER_IP_ADDRESS>/<SENDER_INTERFACE>,<REMOTE_PORT>@<RECEIVER_IP_ADDRESS>/<STEP_1_MAC_ADDRESS>
In this example, I use 6666 for both <LOCAL_PORT> and <REMOTE_PORT>.
Step 4: Setup receiver
There are several ways to retrieve the netconsole packets:
Syslog-ng (Linux)
Easiest way probably is to boot the receiver with an Ubuntu LiveCD. Setup networking and gain shell access.
Edit /etc/syslog-ng/syslog-ng.conf with your favorite editor and append these lines at the very end of the file:
Now restart syslog-ng:
Continue with #Step 5: Check if it works. Once you are done, the logging will be in /var/log/<SENDER_IP_ADDRESS>-netconsole.log.
Netcat (Linux)
If you have the luxury of having a Linux machine as 'receiver', you just might want to try this:
In this example 192.168.1.103 is the same as '<RECEIVER_IP_ADDRESS>' (see #Step 3: Initialize netconsole at boot time)
Just let it sit there. Continue with #Step 5: Check if it works. Once you are done, press 'Control-C'. The messages you want are in ~/netconsole.log.
If this doesn't work, also try without the IP address specifically listed:
Netcat (Linux, alternative)
Some versions of Linux, such as Ubuntu Hardy (8.04), use a different version of Netcat that uses a different syntax. If you use a Linux receiver that has a different version of Netcat, it will print the following error message when you try the commands above:
In this case, you need to issue the following command:
Netcat (Mac OS-X)
Unsurprisingly, as OS-X is a BSD UNIX derivative, Netcat is available out of the box on this platform with the minor difference from Linux that the command is actually called nc rather than netcat.
In this example 192.168.1.103 is the same as '<RECEIVER_IP_ADDRESS>' (see #Step 3: Initialize netconsole at boot time)
Just let it sit there. Continue with #Step 5: Check if it works. Once you are done, press 'Control-C'. The messages you want are in ~/netconsole.log.
If this doesn't work, also try without the IP address specifically listed:
Netcat (Windows)
There's a netcat for Windows available here or here.
Unpack it somewhere (i.e. C:UsersPetDesktopnc)
Open a dosprompt (Start -> Run -> cmd). In this example 192.168.1.103 is the same as <RECEIVER_IP_ADDRESS>.
Just let it sit there. Continue with #Step 5: Check if it works. Once you are done, press 'Control-C'. The messages you want are in netconsole.txt.
Syslog (Windows)
There's an open source syslog tool here. In the version currently available (2009, Jan), there is no way to change the port syslog listens on. You'll have to change the <REMOTE_PORT> to port 514 (which is the default syslog port).
Step 5: Check if it works
Reboot the 'sender'. Once rebooted execute the command below.
Seems to be working! Now check your 'receiver' to see whether the kernel messages were received! If that's the case, continue to use the 'sender' until it crashes, hopefully the 'receiver' receives some useful information about the crash.
You don't actually need to reboot the sender if you don't want to. You can manually load netconsole via:
One way to test whether logging is working correctly or not is to insert some removable media like a CD, DVD or usb stick.
Once you retrieved the information you needed, we need to clean things up again.
Revert Grub to its original configuration
Grub 2 instructions
Remove netconsole itself
Do you have comments on the content above? Something incomplete or incorrect? Please don't hesitate to drop me a few lines.
I would like to say thanks to Peter Veerman and Leann Ogasawara for reviewing this document.
A big thanks to Bruno Girin for adding the grub-2 instructions
https://wiki.ubuntu.com/KernelTeam/KernelTeamBugPolicies#Problems%20in%20capturing%20information
Another netconsole tutorial
Netconsole documentation
Good Luck Santa Mac Os Catalina
Netconsole tutorial for SuSe
KiBi's netconsole tutorial
CategoryDebugging
Good Luck Santa Mac Os Download
Kernel/Netconsole (last edited 2017-11-06 19:53:31 by penalvch)