[NTLUG:Discuss] How often does inittab respawn?

Patrick R. Michaud pmichaud at pobox.com
Sun Jul 22 11:26:25 CDT 2007


On Sun, Jul 22, 2007 at 09:22:47AM -0500, Neil Aggarwal wrote:
> Hello:
> 
> How often does inittab respawn and is is possible
> to control how often it does for a process listed?

The inittab file is used by init(8), which respawns whenever
one of its descendant processes dies.  (Init can also respawn
in response to a powerfail signal, or when it's signaled
by telinit to change the system's runlevel.)

So, respawning is generally "immediate", and triggered
by the termination of a process generated from an inittab
entry.

> I am thinking of using it to ensure and SSH tunnel
> remains connected.  The problem I see is if the remote
> server is down, inittab may attempt to reconnect so
> often that it will cause a huge load on my server.

If init detects that a particular entry in inittab is
respawning rapidly (more than 10 times in 2 minutes), it 
will generally suspend re-spawning that entry for another
5 minutes or until it receives a signal that causes it
to explicitly rescan inittab and try again.

Pm



More information about the Discuss mailing list