From owner-freebsd-questions Wed Oct 8 10:59:56 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA04040 for questions-outgoing; Wed, 8 Oct 1997 10:59:56 -0700 (PDT) (envelope-from owner-freebsd-questions) Received: from sam.networx.ie (ts07-08.dublin.indigo.ie [194.125.148.133]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA04034 for ; Wed, 8 Oct 1997 10:59:51 -0700 (PDT) (envelope-from mike@NetworX.ie) Received: from mike (mike.networx.ie [194.9.12.33]) by sam.networx.ie (8.8.5/8.8.5) with SMTP id XAA18494 for ; Tue, 7 Oct 1997 23:45:34 +0100 (BST) X-Organisation: I.T. NetworX Ltd X-Business: Network Consultancy and Training X-Address: 67 Merrion Square, Dublin 2, Ireland X-Voice: +353-1-676-8866 X-Fax: +353-1-676-8868 Date: Wed, 8 Oct 1997 00:41:34 BST From: Michael Ryan Reply-To: mike@NetworX.ie Subject: "ps ax" in infinite loop! To: FreeBSD Support Message-ID: Priority: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi all, I ran my /bin/sh script just now to bring down my PPP link to the Internet. One part of that is the killing off of Squid. The code is as follows: pid="`ps ax | egrep squid | egrep -v egrep | awk '{ print $1 }'`" test "$pid" && kill $pid The script wasn't finishing as quick as it should. When I logged in on another window, and did a "ps ax" to see what was happening, the "ps ax" executing within the script was gobbling up just about all available CPU time! Its TIME column was showing 11:48.23 and climbing by a second each second! Anybody seen this and know a solution? Please email me directly. Bye, Mike ---