From owner-freebsd-stable Thu Jun 13 22: 9:11 2002 Delivered-To: freebsd-stable@freebsd.org Received: from cain.gsoft.com.au (genesi.lnk.telstra.net [139.130.136.161]) by hub.freebsd.org (Postfix) with ESMTP id D1C0937B41D for ; Thu, 13 Jun 2002 22:09:05 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by cain.gsoft.com.au (8.12.4/8.12.3) with ESMTP id g5E58dxw081467; Fri, 14 Jun 2002 14:38:43 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Subject: Re: NIS server status From: "Daniel O'Connor" To: Doug Hardie Cc: thomas@cuivre.fr.eu.org, stable@FreeBSD.ORG In-Reply-To: References: <20020609201909.J7944-100000@woozle.rinet.ru> <20020612151050.A68356@melusine.cuivre.fr.eu.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.5 Date: 14 Jun 2002 14:38:36 +0930 Message-Id: <1024031324.11645.1.camel@chowder.gsoft.com.au> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.6 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 2002-06-14 at 13:33, Doug Hardie wrote: > >Why not use something along the line of: > > ps ax|grep ypserv|grep -v grep > /dev/null || ypserv > >from a crontab entry? > > Most servers create a pid file. It would be nice for there to be > consistency in this. Also, grepping for processes is hard to get exactly right. If I run 'vi ypserv.c' the previous example will falsely assume ypserv is running. PID files are better but really suck when you restart your computer badly and they aren't deleted, or a new process takes the PID of your daemon. It would be really really nice if there was some way of having the kernel associate a file with a process, and if the process dies the file is unlinked. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 9A8C 569F 685A D928 5140 AE4B 319B 41F4 5D17 FDD5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message