From owner-freebsd-questions Wed Jun 30 9:40:26 1999 Delivered-To: freebsd-questions@freebsd.org Received: from control.colossus.dynip.com (226-193.adsl2.avtel.net [207.71.226.193]) by hub.freebsd.org (Postfix) with ESMTP id A607215532 for ; Wed, 30 Jun 1999 09:40:21 -0700 (PDT) (envelope-from dburr@control.colossus.dynip.com) Received: (from dburr@localhost) by control.colossus.dynip.com (8.9.3/8.9.2) id JAA31074; Wed, 30 Jun 1999 09:40:12 -0700 (PDT) (envelope-from dburr) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <19990630094731.A50144@dan.emsphone.com> Date: Wed, 30 Jun 1999 09:40:12 -0700 (PDT) Organization: Computer Help From: Donald Burr To: Dan Nelson Subject: Re: monitor process Cc: freebsd-questions@FreeBSD.ORG, Sodah Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG A long time ago in a galaxy far, far away (actually, it was on 30-Jun-99), the great prophet Dan Nelson once wrote: > In the last episode (Jul 01), Sodah said: >> Greetings, >> >> I have process that dies after 4 hours or more. >> Is it possible to monitor it and make it starts again >> in auto-mode without typing it at the prompt? > > what I usually do is write a small wrapper script: > > while : ; do > brokenprogram > sleep 10 > done The daemontools port (/usr/ports/sysutils/daemontools) is excellent for doing just this type of thing. You can start a service (program) with the "svc" command, and it will keep monitoring it, and, if it dies, will restart it for you. --- Donald Burr -Member The FreeBSD Project| PGP: Your *NEW* WWW HomePage: http://more.at/dburr/ ICQ #16997506 | right to Address: P.O. Box 91212, Santa Barbara, CA 93190-1212 | 'Net privacy. Phone: (805) 957-9666 FAX: (800) 492-5954 | USE IT. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message