Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm running a network with several embedded modules running Linux.
They are all controlled by 1 server, connected over a standard LAN network. This server can also take care of updates for the modules.
Whenever something goes wrong, for example after an update, one of the modules can suffer a kernel panic. I would like the module to report this to the server, instead of just panicking away...
So my question:
- would it be possible to edit the panic() function in the kernel source to send an (UDP) message to the server? (supposed it already has acquired an IP address through DHCP) (I do have C programming experience, but no Linux kernel programming experience)
- would it be _wise_ to do so?
Would it be possible to edit the panic() function in the kernel source to send an (UDP) message to the server?
It would be possible, but it would be difficult for a novice kernel developer. And being a novice, you would probably use a solution that would introduce instability into the kernel. You might end up creating more panics than you were trying to monitor.
Originally Posted by bameije
Would it be _wise_ to do so?
If you want the wise solution, you can easily write a user space application that sends out UDP heartbeat messages. If a machine stops sending out heartbeats, you can assume it is hung. The advantage of this situation is that you potentially capture a wider variety of problems than just kernel panics (e.g. network adapter failure).
This will reboot the machine to the new kernel and create a /proc/vmcore (kernel dump core). You can write a user space program to send the update in the new kernel saying that the system rebooted with the dump core. Analysing the dump core with gdb OR crash utility will tell you which module created the panic.