LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This 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.

Notices


Reply
  Search this Thread
Old 05-20-2010, 10:39 AM   #1
bameije
LQ Newbie
 
Registered: May 2010
Posts: 5

Rep: Reputation: 0
Send message to server on Kernel Panic


Hi LQ,

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?

Thanks in advance.
 
Old 05-20-2010, 01:33 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by bameije View Post
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.

Quote:
Originally Posted by bameije View Post
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).
 
Old 05-21-2010, 03:04 AM   #3
bameije
LQ Newbie
 
Registered: May 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for your reply.

I already have the alive messaging to the server, but I thought it would be useful that the module reported itself as 'panicked'.

Quote:
Originally Posted by David1357 View Post
And being a novice, you would probably use a solution that would introduce instability into the kernel.
That is exactly what I was afraid of :)
I guess I will follow your advice, unless someone else comes up with some useful tips how to do it.
 
Old 06-21-2010, 01:27 PM   #4
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by bameije View Post
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...
Have you looked at using the "Remote Machine" facility in syslogd (man syslog.conf) to send the panic messages to the server?
 
Old 07-19-2010, 04:18 AM   #5
zaks_974
LQ Newbie
 
Registered: Jul 2010
Location: Bangalore
Distribution: fedora
Posts: 24

Rep: Reputation: 1
Use kexec/kdump utility from
http://www.linux-mag.com/id/2998

OR

http://lxr.linux.no/linux+v2.6.34.1/...kdump.txt#L150

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.
 
  


Reply

Tags
kernel, panic, remote, server



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
weird kernel panic message blackzed Debian 2 07-10-2007 04:13 PM
Kernel panic message on boot starkadder MEPIS 3 06-18-2007 06:20 AM
Kernel panic message after Fedora 3 Installation raomuppuri Linux - Software 0 06-03-2005 01:40 AM
another kernel panic error message o_0 Linux - General 5 10-05-2004 09:22 PM
Kernel Panic message artman62 Linux - General 9 07-15-2002 11:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 04:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration