From owner-freebsd-questions@FreeBSD.ORG Mon Nov 27 20:47:46 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CAD8F16A500 for ; Mon, 27 Nov 2006 20:47:46 +0000 (UTC) (envelope-from jhall@vandaliamo.net) Received: from trueband.net (mailout1.trueband.net [216.163.120.3]) by mx1.FreeBSD.org (Postfix) with SMTP id A715F43DD2 for ; Mon, 27 Nov 2006 20:45:10 +0000 (GMT) (envelope-from jhall@vandaliamo.net) Received: (qmail 4559 invoked by uid 1006); 27 Nov 2006 20:46:10 -0000 Received: from jhall@vandaliamo.net by rs0 by uid 1003 with qmail-scanner-1.16 (spamassassin: 3.1.4. Clear:SA:0(1.0/100.0):. Processed in 3.263886 secs); 27 Nov 2006 20:46:10 -0000 X-Spam-Status: No, hits=1.0 required=100.0 X-Spam-Level: * Received: from unknown (HELO trueband.net) (172.16.0.14) by -v with SMTP; 27 Nov 2006 20:46:06 -0000 Received: (qmail 5393 invoked from network); 27 Nov 2006 20:46:06 -0000 Received: from unknown (HELO admintool.trueband.net) (127.0.0.1) by -v with SMTP; 27 Nov 2006 20:46:06 -0000 Received: from 65.117.48.155 (SquirrelMail authenticated user jhall@vandaliamo.net) by admintool.trueband.net with HTTP; Mon, 27 Nov 2006 20:46:06 -0000 (GMT) Message-ID: <2365.65.117.48.155.1164660366.squirrel@admintool.trueband.net> Date: Mon, 27 Nov 2006 20:46:06 -0000 (GMT) From: jhall@vandaliamo.net To: freebsd-questions@freebsd.org User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Checking processes without PIDs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 20:47:46 -0000 I have written a script to determine if processes are running. I am using, as an example, ps -ax | grep -c postgrey Ocassionally, I am receiving a notification a process is not running (and it varies which process I receive notifications for). And, when checking, the process actually is running. Is there a better way to determine if a process is running than using ps and grep? Thanks, Jay