* [gentoo-user] automatic restart of crushed processes...
@ 2005-07-26 10:00 Jarry
2005-07-26 11:10 ` Neil Bothwick
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jarry @ 2005-07-26 10:00 UTC (permalink / raw
To: gentoo-user
Greetings to all Gentoo-users!
Is it somehow possible to check, whether a certain process is running,
and if not, then start it? I would like to use it for some processes
that crush sometimes (like teamspeak and some game-servers), and to
mointor sshd, because it is critical for me (my server will be 300km
away from me).
I thought about writing some small shell-script, which would be run
by cron at regular intervals, check if a process is running (something
like "ps -e | grep $PROCNAME", or maybe with "pidof -s $PROCNAME")
and if not, than it would start that process with its script in
/etc/init.d.
But if there is already something which would do the same, I don't
want to work on inventing the wheel again. Moreover, my shell scripts
are rather "quick'n'dirty", so maybe I should start with reading
"Advanced Bash-Scripting Guide"...
Jarry
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] automatic restart of crushed processes...
2005-07-26 10:00 [gentoo-user] automatic restart of crushed processes Jarry
@ 2005-07-26 11:10 ` Neil Bothwick
2005-07-26 12:35 ` Mariusz Pękala
2005-07-26 14:54 ` Bastian Balthazar Bux
2 siblings, 0 replies; 4+ messages in thread
From: Neil Bothwick @ 2005-07-26 11:10 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 828 bytes --]
On Tue, 26 Jul 2005 12:00:05 +0200, Jarry wrote:
> Is it somehow possible to check, whether a certain process is running,
> and if not, then start it? I would like to use it for some processes
> that crush sometimes (like teamspeak and some game-servers), and to
> mointor sshd, because it is critical for me (my server will be 300km
> away from me).
* app-admin/mon
Available versions: 0.99.2-r1
Homepage: http://www.kernel.org/software/mon/
Description: highly configurable service monitoring daemon
* net-misc/autossh
Available versions: 1.2e 1.2f 1.2g
Homepage: http://www.harding.motd.ca/autossh/
Description: Automatically restart SSH sessions and tunnels
--
Neil Bothwick
Locutous for Pontiac: Excitment is irrelivent.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] automatic restart of crushed processes...
2005-07-26 10:00 [gentoo-user] automatic restart of crushed processes Jarry
2005-07-26 11:10 ` Neil Bothwick
@ 2005-07-26 12:35 ` Mariusz Pękala
2005-07-26 14:54 ` Bastian Balthazar Bux
2 siblings, 0 replies; 4+ messages in thread
From: Mariusz Pękala @ 2005-07-26 12:35 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 539 bytes --]
On 2005-07-26 12:00:05 +0200 (Tue, Jul), Jarry wrote:
> Greetings to all Gentoo-users!
>
> Is it somehow possible to check, whether a certain process is running,
> and if not, then start it? I would like to use it for some processes
> that crush sometimes (like teamspeak and some game-servers), and to
> mointor sshd, because it is critical for me (my server will be 300km
> away from me).
>
init ?
respawn entry in inittab ?
--
No virus found in this outgoing message.
Checked by 'grep -i virus $MESSAGE'
Trust me.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] automatic restart of crushed processes...
2005-07-26 10:00 [gentoo-user] automatic restart of crushed processes Jarry
2005-07-26 11:10 ` Neil Bothwick
2005-07-26 12:35 ` Mariusz Pękala
@ 2005-07-26 14:54 ` Bastian Balthazar Bux
2 siblings, 0 replies; 4+ messages in thread
From: Bastian Balthazar Bux @ 2005-07-26 14:54 UTC (permalink / raw
To: gentoo-user
Jarry wrote:
> Greetings to all Gentoo-users!
>
> Is it somehow possible to check, whether a certain process is running,
> and if not, then start it? I would like to use it for some processes
> that crush sometimes (like teamspeak and some game-servers), and to
> mointor sshd, because it is critical for me (my server will be 300km
> away from me).
>
> I thought about writing some small shell-script, which would be run
> by cron at regular intervals, check if a process is running (something
> like "ps -e | grep $PROCNAME", or maybe with "pidof -s $PROCNAME")
> and if not, than it would start that process with its script in
> /etc/init.d.
>
> But if there is already something which would do the same, I don't
> want to work on inventing the wheel again. Moreover, my shell scripts
> are rather "quick'n'dirty", so maybe I should start with reading
> "Advanced Bash-Scripting Guide"...
>
> Jarry
>
emerge -pv sys-process/daemontools
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild R ] sys-process/daemontools-0.76-r4 -doc (-selinux) -static
36 kB
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-07-26 15:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-26 10:00 [gentoo-user] automatic restart of crushed processes Jarry
2005-07-26 11:10 ` Neil Bothwick
2005-07-26 12:35 ` Mariusz Pękala
2005-07-26 14:54 ` Bastian Balthazar Bux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox