etc/inittab

etc/inittab

Post by SST » Fri, 30 Mar 2001 23:27:24



Hi

Can I put an entry in inittab with respawn action to execute a script?
I have written a script to check if application is
running, if not, the script restarts it.

Thanks in advance

SST

 
 
 

etc/inittab

Post by Alberto 'JCL-9000' Varesi » Sat, 31 Mar 2001 00:22:26



> Hi

> Can I put an entry in inittab with respawn action to execute a script?
> I have written a script to check if application is
> running, if not, the script restarts it.

> Thanks in advance

> SST

Hi
most of the entries of inittab do launch a script. What the script does is up to
it.

In your case you have keep the script running and periodically check the state
of your application, making it a daemon

If you check and exit, then init will relaunch the script as soon as it
discovers it has finished, so you end up with a CPU eater ...

Have a loop in the script that checks and sleeps for a while.
Restart is used to immediately restart daemons in case they crash.

HTH
--
 Alberto 'JCL-9000' Varesio -AIX V4.3 System Support- Phone: +39-011-415-8111
 EDIST Spa - Via Goito 51/A      Riding the world       Fax: +39-0270040-8636
 10195 Grugliasco (TO) ITALY     on a Honda CB500      Cell: +39-349-492-4769


 
 
 

etc/inittab

Post by Dale Talco » Fri, 30 Mar 2001 22:31:57




...
>> Can I put an entry in inittab with respawn action to execute a script?
>> I have written a script to check if application is
>> running, if not, the script restarts it.
>most of the entries of inittab do launch a script. What the script does is
>up to it.
...
>Have a loop in the script that checks and sleeps for a while.

You might also consider using AIX's System Resource Controller.  It's
designed for this purpose.  Check the man pages for mkssys, startsrc,
and stopsrc, and this URL:

http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/aixbman/admnconc/s...

--
Dale Talcott, Purdue University Computing Center

 
 
 

etc/inittab

Post by XP Le » Fri, 13 Apr 2001 03:59:44


The cron command is also very good for this kind of thing.




> ...
> >> Can I put an entry in inittab with respawn action to execute a script?
> >> I have written a script to check if application is
> >> running, if not, the script restarts it.

> >most of the entries of inittab do launch a script. What the script does
is
> >up to it.
> ...
> >Have a loop in the script that checks and sleeps for a while.

> You might also consider using AIX's System Resource Controller.  It's
> designed for this purpose.  Check the man pages for mkssys, startsrc,
> and stopsrc, and this URL:

http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/aixbman/admnconc/s...
overview.htm

- Show quoted text -

> --
> Dale Talcott, Purdue University Computing Center


 
 
 

1. login problems after tinkering with/etc/inittab & /etc/uugetty.

Hi!
Recently I tried to set up a my Linux1.23 (slackware) for incoming calls.
I did so, but after that my login system failed.
I can't login on to the computer except as a root.
it says:
dl_boot: open /dev/zero failed!

What does it mean?
Pavel
---
No SIGNATURE. Call (250) 595-7289 or visit my Web site at
http://www.islandnet.com/~skendall/pavel.htm for complete copy of my resume.
Avail. in: Word for Win 6.0 , WP 6.1 for win and Envoy Reader formats.
Pavel Zaitsev
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Don't get mad  -- get even.
  -- Kennedy's Dictionary.

2. installing tcsh

3. /etc/getty and /etc/inittab woes

4. Editing mp3s?

5. /etc/inittab problems

6. boot fails

7. startx and /etc/inittab

8. Production Documentation & the DWB

9. starting x with init scripts vs /etc/inittab...

10. /etc/inittab -- powerfail

11. startx and /etc/inittab

12. Patch to allow pppd to be run from /etc/inittab

13. /etc/inittab suggestion for all distributions