LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-17-2003, 11:56 AM   #1
snoopy42
LQ Newbie
 
Registered: Dec 2002
Posts: 12

Rep: Reputation: 0
Question Ping


Does anybody know a kind of pinging feature to Kernel?
I'd like to have a system where my application keeps pinging to Kernel periodically and Kernel does something if the application stops pinging.
 
Old 01-17-2003, 01:21 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 250Reputation: 250Reputation: 250
What do you mean by pinging the kernel ? What are you trying to accomplish ?
 
Old 01-17-2003, 03:26 PM   #3
snoopy42
LQ Newbie
 
Registered: Dec 2002
Posts: 12

Original Poster
Rep: Reputation: 0
Ping

I have a system like this.

Application-A is running and keeps pinging to hardware every 30 seconds.

Application-A can ping to hardware by using a function provided by the hardware company.

If Application-A got frozen and can't ping for a certain time, the harware's watchdog works and reboots the whole system.

I'm going to implement another system that doesn't have any function to ping to hardware.

I'm wondering if I can have application-A inform its current status to Kernel and Kernel can make the system reboot or do something if Kernel doesn't get anything from application-A for a certain time.
 
Old 01-17-2003, 04:21 PM   #4
tinesthai
LQ Newbie
 
Registered: Jan 2003
Distribution: Red Hat 8.0
Posts: 5

Rep: Reputation: 0
Its still a little confusing. What are you trying to accomplish?
Are you concerned about keeping a machine up, or are you concerned with insuring a specific application is running?

Either way, I think the easiest way is to write a couple of perl scripts.
You might change your approach to the scripts a little depending on your primary concerns.
 
Old 01-17-2003, 05:00 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,727

Rep: Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381
A software watchdog timer.
 
Old 01-17-2003, 06:00 PM   #6
snoopy42
LQ Newbie
 
Registered: Dec 2002
Posts: 12

Original Poster
Rep: Reputation: 0
Red face Ping

Sorry that I confused everybody.

I want to enable the system recover when my application doesn't run properly.
When you turn on the computer, my system starts and my application runs automatically. I don't want customers to touch the system. Nobody can rerun the application. It should recover when my application has any problems.
How to recover may be to rerun a specific application or reboot the system itself.

I'd like to know if my application runs and sends some information or stops its job.

By the way, would you please expalin a software watchdog timer?
It is Kernel's feature? or can I download some software?
 
Old 01-17-2003, 07:26 PM   #7
dpembrook
LQ Newbie
 
Registered: Jan 2003
Location: Grand Rapids, MI
Distribution: Redhat and FreeBSD
Posts: 9

Rep: Reputation: 0
For the worst case scenario, if the computer fails to respond. You could take a basic stamp processor:

See: http://www.parallax.com/

1) Have the "pinging" program toggle a bit on and off on a serial or parallel port

2) Write a program for the stamp processor to watch for the bit to go on and off, If it doesn't enable the reset on the motherboard to the PC.

This would be in hardware and work independent of the computer.

Use the same approach (setting a value to 1 then 0 on a timer) in software with a Perl script or something and reset the application with the script should the application fail.

If this is a network service, you still should be checking externally to see if clients can connect and interact with the service.
 
Old 01-17-2003, 07:34 PM   #8
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
MaicaelK said it best - the software watchdog is a good start. You can configure this in your kernel but you should read up on it first.

Daniel J. Bernstien has written a pretty comprehensive set of UNIX tools which you migh also want to have alook at called daemontools. Try a google search.

Some motherborads (Intel-based) may also have a built-in watchdog timer which can be configured to halt the machine if a clock value isn't constantly reset. I've never had the opprtunity to play with it but you can read up on this in the kernel source Documentation.
 
Old 01-21-2003, 07:25 PM   #9
snoopy42
LQ Newbie
 
Registered: Dec 2002
Posts: 12

Original Poster
Rep: Reputation: 0
Red face Ping : watchdog

I appreciate every response.
I decided to install watchdog-5.2.tar.gz.

I rebuilt kernel because I set "y" to watchdog timer support and software watchdog.

1. cd /usr/src/linux-2.4.7-10
2. make xconfig
3. set "y" to Watchdog Timer Support, Disable watchdog shutdown on close, Software Watchdog
4. make dep
5. make clean
6. make bzImage
7. make modules
8. make modules_install

I succeded in rebuilding part.

Then, I installed watchdog-5.2.tar.gz.
1. tar zxvf watchdog-5.2.tar.gz
2. cd watchdog-5.2
3. ./configure
4. make
5. make install

I also made special file.
1. cd /dev
2. mknod watchdog c 10 130

I changed watchdog.conf to use /dev/watchdog.

Then I excuted watchdog. watchdog shows up when I type "ps -ax".

However, I got an error and /var/log/messages says
wdt: IRQ 11 is not free.
IRQ 11 is asigned statically in wdt.c

IRQ 11 is used for usb in my machine.

Should I change wdt.c and compile it?

wdt.c is /usr/modules/2.4.7-10/kernel/drivers/char

I'm beginner and never modified any source code.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 03:39 PM
Any idea why this time I can not ping my LAN pc but can PING for ex. www.yahoo.com vakia Debian 5 09-28-2005 07:42 PM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 10:10 AM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 05:57 AM
I can ping google.com successfully,but ping client(in my intranet) failed.Why? whepin Linux - Newbie 4 12-30-2001 05:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:48 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration