From owner-freebsd-hackers Fri Mar 1 17:14:27 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from fep04-mail.bloor.is.net.cable.rogers.com (fep04-mail.bloor.is.net.cable.rogers.com [66.185.86.74]) by hub.freebsd.org (Postfix) with ESMTP id B72F137B402 for ; Fri, 1 Mar 2002 17:14:21 -0800 (PST) Received: from hyperion ([24.156.109.145]) by fep04-mail.bloor.is.net.cable.rogers.com (InterMail vM.5.01.04.06 201-253-122-122-106-20020109) with ESMTP id <20020302011420.GWWO159916.fep04-mail.bloor.is.net.cable.rogers.com@hyperion>; Fri, 1 Mar 2002 20:14:20 -0500 Date: Fri, 1 Mar 2002 20:14:18 -0500 Subject: Re: how do I see the current number of PTYs in use ? Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v481) Cc: "Daniel O'Connor" , Danny Braniss , Paul Halliday , Patrick Thomas , freebsd-hackers@FreeBSD.ORG To: Dan Nelson From: Joe Abley In-Reply-To: <20020301224926.GC3548@dan.emsphone.com> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.481) X-Authentication-Info: Submitted using SMTP AUTH PLAIN at fep04-mail.bloor.is.net.cable.rogers.com from [24.156.109.145] using ID at Fri, 1 Mar 2002 20:14:18 -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Friday, March 1, 2002, at 05:49 , Dan Nelson wrote: > In the last episode (Mar 02), Daniel O'Connor said: >> On Fri, 2002-03-01 at 21:19, Danny Braniss wrote: >>> fstat | awk '{print $8}' | egrep 'tty[pqrsPQRS]' | sort -u | wc -l >>> >>> is IMHO correct, ;-) >> >> Ach, of course :) >> I hope the original poster is satisfied 8-) > > Easier might be "pstat -t | grep 'tty[pqrsPQRS]' | wc -l" pstat -t | grep -ic 'tty[pqrs]' saves a fork. Since we're being silly. Joe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message